Custom search query : edismax(user_entered_search_keywords) AND (condition A OR condition B)

243 Views Asked by At

My edismax is running perfect and it handles the query formation internally when i just pass the search keywords to dismax.

The next step of my implementation is a custom query where let dismax do all the mumbo jumbo on those search keywords, but AND the dismax query with a custom condition.

When I was not using dismax, i use to create my own queries manually e.g. (keyword1 OR Keyword2) AND Contidion A, but in that case i had to manually create all PnCs of search keyword queries. Now dismax does that but I dont know how to use dismax along with a custom condition that does not depend on user entered search keywords.

Is it possible using (e)dismax, is yes then how?

2

There are 2 best solutions below

0
On BEST ANSWER

It'd be best if you could represent your custom conditions via a filter query in which case you could use the standard query parser to construct your custom conditions.

0
On

Not 100% sure what you are asking but it looks like you want to execute an edismax query and a regular non-dismax query at the same time.

If you want to execute multiple text based queries look at this document:

http://searchhub.org//2009/03/31/nested-queries-in-solr/