solr

How to add multiple suggesters definition in solr search components

旧巷老猫 提交于 2019-12-11 20:31:32
问题 I am using solr 5.1. I am trying to configure multiple suggester definition in Solr search component according to Apache solr wiki. I have configured single suggester perfectly and it works perfect but whenever I try to configure multiple suggester it gives me following errors java.lang.NullPointerException at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:190) at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:143) at org

Versioning and Optimistic Locking in Solr 4.0?

蓝咒 提交于 2019-12-11 20:27:10
问题 I saw Versioning and Optimistic Locking – combined with real-time get, this allows read-update-write functionality that ensures no conflicting changes were made concurrently by other clients. from http://searchhub.org/dev/2012/05/21/solr-4-preview/ and other sources. Although it is very interesting, there is few other mentions on this topic. Can someone explain this feature? 回答1: I cannot fully explain this feature. But, here are some additional links from the Solr Issues and Wiki that

How to get same result as following Mysql query from Solr?

怎甘沉沦 提交于 2019-12-11 20:16:50
问题 Mysql Query : The inner query returns all the attribute_value containing "man" and it's position in attribute value. The outer query orders it in descending order of position number. Thereby giving results in order where "man" starts moving from 1st position to later positions Like man manager aman human hanuman assistant manager indian institute of management This is the SQL query: SELECT f1.av FROM ( SELECT `attribute_value` av, LOCATE("man",LOWER(`attribute_value`)) po FROM db_attributes

solr indexing and reindexing

孤街醉人 提交于 2019-12-11 20:08:38
问题 I have the schema with 10 fields. One of the fields is text(content of a file) , rest all the fields are custom metadata. Document doesn't chnages but the metadata changes frequently . Is there any way to skip the Document(text) while re-indexing. Can I only index only custom metadata? If I skip the Document(text) in re-indexing , does it update the index file by removing the text field from the Index document? 回答1: To my knowledge there's no way to selectively update specific fields. An

Solr cloud distributed search on collections

笑着哭i 提交于 2019-12-11 19:53:28
问题 Currently I have a zookeeper instance controlling replication on 3 physical servers. It is the solr integrated zookeeper. 1 shard, 1 collection. I have a new requirement in which I will need a new static solr instance (1 new collection, no replication). Same schema as previous collection. A copy of this instance will also be placed on the 3 physical servers mentioned above. A caveat is that I need to perform distributed searches across the 2 collections and have the results blended. Thanks to

How can I put my custom URLs to SOLR results

廉价感情. 提交于 2019-12-11 19:46:29
问题 I am trying to index my database data with SOLR and I am successfully indexed it. What I need is: I need to put URLs with every results. The URLs for each result item will be different. Each result item need to append its item_id (which is available as a field) with its URL. I am very new to SOLR configurations and SOLR query, so please help to implement a better search result XML. Thanks in advance. 回答1: You can store URL in an additional field (stored=true indexed=false) and then simply

The given key was not present in the dictionary solrnet

泄露秘密 提交于 2019-12-11 19:45:23
问题 Please note: I know for the question SolrNet - The given key was not present in the dictionary and I have initialized solr object just like Mauricio suggests. I am using solr 4.6.0 and solrnet build #173, .net framework 4.0 and VS2012 for development. For some unknown reason I am receiving error 'The given key was not present in the dictionary'. I have a document with that id in solr, I've checked via browser. It's a document like any other document. Why is error popping up? My code (I've

Solr - fuzzy search issue with PatternTokenizer Factory

一曲冷凌霜 提交于 2019-12-11 19:17:43
问题 I'm using Solr4.2 in my application. I have changed my text field definition to use the Solr.PatternTokenizerFactory instead of Solr.StandardTokenizerFactory , and changed my schema definition as below <fieldType name="text_token" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.PatternTokenizerFactory" pattern="[^a-zA-Z0-9&\-']|\d{0,4}s:" /> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements

Hybrid search and indexing: words and token metadata in Solr

一曲冷凌霜 提交于 2019-12-11 18:59:02
问题 I am building a set of plugins for Solr to enable a "hybrid" search which would match either words or token (not document!) metadata (specific ID numbers). Same words may have different ID numbers in different context, generated in indexing time by an external application. Such as, "run" may have 12345 in one case and 54321 in another (depends on the context). The ID numbers should have more weight in the search. (They will be provided in the query in search time by the same external

Solr Index multiple values AS one field

橙三吉。 提交于 2019-12-11 18:55:49
问题 I want to do queries on double fields where four values are actually grouped and each document can have multiple instances of this. So what I need is a field where I can store something like this <doc> <field name="id">id</field> <field name="valueGroup">1 2 3 4</field> <field name="valueGroup">5 6 7 8</field> </doc> And then do ranged queries in this way: valueGroup: [0,0,0,0 to 3,8,8,8]. I cannot Index this as single fields with multivalued="true" because each group needs to be treated