Search · Solr

Solr Query Parser – OR instead of AND ?


Answer depends on business requirement though i will suggest to keep Query Parser “AND”. It will narrow down the search result rather than expend search response.

eg. If a user search for string “Mohit Bansal” means that he/she is looking for results having both Mohit & Bansal, If we search with OR, then it will result with all document having Mohit or Bansal or Both.

My Suggestion: Update schema.xml for solrQueryParser – AND

<solrQueryParser defaultOperator=”AND”/>

Advertisements

3 thoughts on “Solr Query Parser – OR instead of AND ?

  1. beautiful blog with nice informational content. this is a really interesting and informative post. good job! keep it up, hope to read your other updates. thanks for this nice sharing.

  2. this was a really quality post. in theory i’d like to write like this too. taking time and real effort to make a good article.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s