Hi all,

I have two simple questions:

I have an Item entity with id, name, category and description fields. The
main requirements is to be able to search in all the fields with the same
string and different priority per field, so matches in name appear before
category matches, and they appear before description field matches in the
result list.

1. I think to create an index having the same fields, because each field
needs different priority during searching.

2. And then do the search with a query like this:
name:search_string^1.3 OR categpry:search_string^1.2 OR
description:search_string^1.1

Is this the right approach to model the index and search query?

Thanks in advance.
Bilgin

Reply via email to