solr4

How to filter values returned on a multivalued field in Solr

大兔子大兔子 提交于 2019-12-06 05:19:07
I have a document with a field called uuids. This field is a list (multivalued) can have up to 100k values per document. I want to search for documents that match uuids that start with "5ff6115e" for instance. I can already do it successfully by using q=uuids:5ff6115e* : http://localhost:8983/solr/test1/select?q=uuids%3A5ff6115e *&rows=1&fl=uuids&wt=json&indent=true However, the resultant document brings me all 100k values for this field. What I want is not only filter the documents whose uuids field start with this value, but also filter the field values returned so that I will only receive

Add and update data to Solr-4.3.0 using node module solr-client

非 Y 不嫁゛ 提交于 2019-12-05 11:49:40
Let me take an example to explain the scenario. Suppose i have data indexed to Solr as : { "id" : "872919092", "filename" : "science_book", "path" : "/local/abc/" } Now i want to modify the data already indexed to Solr with id : 872919092 . I need to change the filename : science_book with filename : history_book and add new attribute topic : mughal to the same indexed data keeping path unchanged. I do not want to pass the path again as there is no change in that and already indexed to Solr. According to the documentation of Solr this is possible. How do i do that using nodejs solr-client

Faceting using SolrJ and Solr4

坚强是说给别人听的谎言 提交于 2019-12-05 08:26:18
I've gone through the related questions on this site but haven't found a relevant solution. When querying my Solr4 index using an HTTP request of the form &facet=true&facet.field=country The response contains all the different countries along with counts per country. How can I get this information using SolrJ? I have tried the following but it only returns total counts across all countries, not per country: solrQuery.setFacet(true); solrQuery.addFacetField("country"); The following does seem to work, but I do not want to have to explicitly set all the groupings beforehand: solrQuery

Solr 4 - missing required field: uuid

对着背影说爱祢 提交于 2019-12-05 08:13:24
I'm having issues generating a UUID using the dataImportHandler in Solr4. Im trying to import from an existing MySQL database. My schema.xml contains: <fields> <field name="uuid" type="uuid" indexed="true" stored="true" required="true" /> <field name="id" type="string" indexed="true" stored="true" required="true"/> <field name="address" type="text_general" indexed="true" stored="true"/> <field name="city" type="text_general" indexed="true" stored="true" /> <field name="county" type="string" indexed="true" stored="true" /> <field name="lat" type="text_general" indexed="true" stored="true" />

Search Number Plates using Solr

断了今生、忘了曾经 提交于 2019-12-04 14:41:03
问题 I am working on searching a database containing huge db of records of number plates. I am planning to use Apache Solr for implementing the search feature. I don't know the term how to call the search feature I want to implement. But let me explain my requirements to you: When people search, I want a Solr to subtitute certain numbers for letters? Eg. 12 = R 13 = B 4 = A 11 = H etc etc? So for example, when someone search for "John" a search result will be offered should have following

How to configure Solr for improved indexing speed

元气小坏坏 提交于 2019-12-04 10:26:01
问题 I have a client program which generates a 1-50 millions Solr documents and add them to Solr. I'm using ConcurrentUpdateSolrServer for pushing the documents from the client, 1000 documents per request. The documents are relatively small (few small text fields). I want to improve the indexing speed. I've tried to increase the "ramBufferSizeMB" to 1G and the "mergeFactor" to 25 but didn't see any change. I was wondering if there is some other recommended settings for improving Solr indexing

How to fix Solr Exception: Could not find necessary SLF4j logging jars?

▼魔方 西西 提交于 2019-12-04 08:05:44
问题 I have big problems installing Solr 4.3 under Ubuntu 12.04. Firstly i installed tomcat. I can access tomcat via browser on localhost:8080. Into "Tomcat Web Application Manager" i try to install Solr 4.3 via 2solr.war" file. The file is been uploaded an deployed. But i cant get it started. "FAIL - Application at context path /solr could not be started". The log file ( localhost.log ) look like: 07.05.2013 11:05:36 org.apache.catalina.core.ApplicationContext log INFO: HTMLManager: start:

Solr query for matching nested/relational data

旧巷老猫 提交于 2019-12-04 04:58:35
I'm using apache solr for the matching functionality of my webapp, and I encountered a problem of this scenario: I got three programmer, the skill field are their skills, "weight" means how well that skill he/she has: { name: "John", skill: [ {name: "java", weight: 90}, {name: "oracle", weight: 90}, {name: "linux", weight: 70} ] }, { name: "Sam", skill: [ {name: "C#", weight: 98}, {name: "java", weight: 75}, {name: "oracle", weight: 70}, {name: "tomcat", weight: 70}, ] }, { name: "Bob", skill: [ {name: "oracle", weight: 90}, {name: "java", weight: 85} ] } and I have a job seeking for

Solr 4.4: StopFilterFactory and enablePositionIncrements

泪湿孤枕 提交于 2019-12-04 03:56:20
While attempting to upgrade from Solr 4.3.0 to Solr 4.4.0 I ran into this exception: java.lang.IllegalArgumentException: enablePositionIncrements=false is not supported anymore as of Lucene 4.4 as it can create broken token streams which led me to this issue . I need to be able to match queries irrespective of intervening stopwords (which used to work with enablePositionIncrements="true"). For instance: "foo of the bar" would find documents matching "foo bar", "foo of bar", and "foo of the bar". With this option deprecated in 4.4.0 I'm not clear on how to maintain the same functionality. The

How to write nested schema.xml in solr?

喜欢而已 提交于 2019-12-03 15:23:54
问题 How to write nested schema.xml in solr The document in schema.xml says <!-- points to the root document of a block of nested documents. Required for nested document support, may be removed otherwise --> <field name="_root_" type="string" indexed="true" stored="false"/> http://svn.apache.org/viewvc/lucene/dev/trunk/solr/example/solr/collection1/conf/schema.xml?view=markup Which can be used in https://cwiki.apache.org/confluence/display/solr/Other+Parsers#OtherParsers-BlockJoinQueryParsers What