Generic Keyword / Phrases Solr

I use Solr via PHP to find all aspects of my site. I am trying to implement a function and cannot find any information on how to execute it.

I have a group of documents (reviews), each of which concerns a specific product.

I want to find unique keywords 1-2 words (without stop words) that appear in several reviews for one product, with the count of the number of reviews that they display.

As soon as I have this, I want to show the keywords X, the number of reviews they are in, and one top review for each of them highlighted the use of the keyword.

EDIT:

As soon as I have a list of unique (non-stop words / common words) keywords that appear in several reviews, I want to rank them by the number of times they appear in reviews. For example, if people write reviews about cameras, keywords might look like this:

expensive (displayed in 7 reviews) shutter speed (displayed in 5 reviews) poor image (shown in 3 reviews)

As soon as I have these keywords, ranked by the number of reviews, I want to select 1 review by keyword and show those reviews in which the keyword will be displayed. For instance:

"... , , ..." ( 7 ) "... ..." ( 5 ) "... POOR IMAGE - ..." ( 3 )

, . , ( , X ), , , , , cronjob .. , . .

, .

, Solr, .

+3
3

, ShingleFilter. / (, ), .

+1

solr. , solr - "--", , . "review_keyword" . ( , / ). , , . , .

0

It looks like a job to parse text, not solr. You will need a script, probably in python (as it has good text parsing libs) that looks at all the words in the reviews and then gives you the most popular words in each review (or) in all the reviews with their counts. You can then index a few words on both sides of these upper occurring words and create an abstract for your document (the product in this case) and index it in Solr to return as part of the search result.

0
source

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


All Articles