How to perform a fax search?

I would like to know how to do a faceted search using lucene.facet. I’ll explain exactly what I want to do: I have a htmlfiles taxonomy (similar to ODP), and I want the results to be displayed based on the category and the number of hits for each category. Is there any example describing this with lucene?

Edit: I already get results as categories by adding a category field to each document. I want the results displayed as:

Cat1 N1 Cat2 N2 ... 

Instead:

 Cat1 Cat1 ... xN1 times Cat1 Cat2 ... xN2 times Cat2 ... 

In addition, this category field refers only to the level of the taxonomy tree, and I want to use the structure of the taxonomy, for example, having the ability to choose the depth of the search in the taxonomy (I don’t know, purely ..).

Thanks!

+6
source share
1 answer

Since solr and lucene merge with 3.0 anyway, I would highly recommend using solr instead of simple lucene to do a facet search.

You do not need to use all solr with the http server.

Try EmbeddedSolrServer

+1
source

Source: https://habr.com/ru/post/916278/


All Articles