0
votes

I have two requirements for my SOLR implementation:

  1. I need to be able to search on multiple fields at the same time (preferably with field boosting). This is possible using dismax parser.

  2. I also have a specific set of indexed fields (example gender field). I need to be able to apply such specific filters (example: select?q=david&gender:male&status:married). As per my understanding of dismax, this is not possible.

Please suggest if the second requirement can be handled using dismax (or edismax)? For now i am forced to use standard query parser, even though i really liked dismax.

1

1 Answers

0
votes

There is nothing stopping you from using dismax or edismax. Use qf to tell it which fields to search by default, and use fq to apply queries that act as filters.

/select?q=david&fq=gender:male&fq=status:married&qf=name^10 address^3

Filter Queries doesn't affect score, and will be cached separately. If you always filter on both gender and status, you could combine them to get a single query cache instead (fq=gender:male AND status:married).