Solr exact word search

I presume your field is a TextField, by default solr does a fuzzy search on this field. What you want is to set up your field as a string field and add no tokenizer then you’ll get an exact match. You can even combine the exact search with a fuzzy search and use DisMax to … Read more

How to evaluate hosted full text search solutions?

Websolr provides a cloud-based Solr with a control panel. It’s in private beta as of this writing, but you can get the service through Heroku. Another hosted Solr service is PowCloud, also in private beta, which seems to offer strong WordPress integration. SolrHQ: another beta service providing a hosted Solr solution, with Joomla and WordPress … Read more

Solr index vs stored

That is correct. Typically you will want your field to be either indexed or stored or both. If you set both to false, that field will not be available in your Solr docs (either for searching or for displaying). See Alexandre’s answer for the special cases when you will want to set both to false. … Read more

How to select distinct field values using Solr?

Faceting would get you a results set that contains distinct values for a field. E.g. http://localhost:8983/solr/select/?q=*%3A*&rows=0&facet=on&facet.field=txt You should get something back like this: <response> <responseHeader><status>0</status><QTime>2</QTime></responseHeader> <result numFound=”4″ start=”0″/> <lst name=”facet_counts”> <lst name=”facet_queries”/> <lst name=”facet_fields”> <lst name=”txt”> <int name=”value”>100</int> <int name=”value1″>80</int> <int name=”value2″>5</int> <int name=”value3″>2</int> <int name=”value4″>1</int> </lst> </lst> </lst> </response> Check out the wiki for … Read more

How to start Solr automatically?

As you’re on a shared Linux box, you’ll have to ask the system administrator to do the following, probably. Create a startup script in /etc/init.d/solr. Copy this code, my Solr startup script, into that file: #!/bin/sh # Prerequisites: # 1. Solr needs to be installed at /usr/local/solr/example # 2. daemon needs to be installed # … Read more

using OR and NOT in solr query

I don’t know why that doesn’t work, but this one is logically equivalent and it does work: -(myField:superneat AND -myOtherField:somethingElse) Maybe it has something to do with defining the same field twice in the query… Try asking in the solr-user group, then post back here the final answer!

Solr vs. ElasticSearch [closed]

Update Now that the question scope has been corrected, I might add something in this regard as well: There are many comparisons between Apache Solr and ElasticSearch available, so I’ll reference those I found most useful myself, i.e. covering the most important aspects: Bob Yoplait already linked kimchy’s answer to ElasticSearch, Sphinx, Lucene, Solr, Xapian. … Read more