Please note that after the writer is created, the given configuration instance cannot be passed to another writer. It’s constructor takes two arguments: FSDirectory and IndexWriterConfig. IndexWriter class provides functionality to create and manage index. You can check the result set to see the impact of the parameter.Lucene Write Index Example Create IndexWriter The query will boost the score of the graphics card products. In continue with the above query with boost factor we will add one more boost with products having category(cat) as graphics card. The Boost query or bq parameter specifies an additional, optional query clause that will be added to the user’s main query to influence the score. The result will promote the Video card to get higher score and present the document atop of other results. The query will boost the score of the documents with search term present in the name field. Dismax provides option to boost the score based on specific search fields and the numeric value assigned to it. Note, even though the search term video was present in the name field of the Video card it didn’t get higher score. The product ASUS Extreme N7800GTX/2DHTV (256 MB) obtained the same score as the ATI Radeon X1900 XTX 512 MB PCIE Video Card. We have selected only the name of the product from various document and score for the document. The Dismax query will search for the term video in the documents and order the result based on the score. Now open the following URL in the browser.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |