solrluceneedismaxdismax

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


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?


Solution

  • 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.