1

製品検索を実装する必要があります。各製品には、名前、カテゴリ、価格、および availableAtPlace があります。これらのパラメータを使用して検索したい:

- product name - look for specified keywords in product name
- filter those belonging to one of the many selected categories(from fixed 8 categories only, forever)
- filter those within specified price limit. 
- filter those available within radius of 'x' miles from spot 'y'

今、私は次の質問があります:

 1. What should be the query to get the search results filtered by above parameters ?

 2. Is there any way I could store these categories field in optimized
    way(since this is always out of fixed set of 8 values), so that
    query performance could be improved ? Probably some way of defining
    my set earlier so that indexing/querying of this field could be
    optimized!?

 3. I need to sort the results in the order of relevance of keyword
    search within product names + sorted in descending order of price.
    How do I accomplish this sort order?

SolrJ を Solr 4.5 で使用する

4

1 に答える 1