Note that there are some explanatory texts on larger screens.

plurals
  1. POSolr common keyword/phrases
    text
    copied!<p>I am using Solr through PHP for searching all aspects of my site. I am trying to implement a feature and can't find any information on how to accomplish it.</p> <p>I have a group of documents (reviews), each about a specific product.</p> <p>I want to find unique 1-2 word keywords (no stop words) that appear in multiple reviews for a single product, with a count for how many reviews they appear in.</p> <p>Once I have that, I want to show the top X keywords, number of reviews they are in, and a single top review for each one highlighted the use of the keyword.</p> <p>EDIT:</p> <p>Once I have a list of unique (non stop word/common words) keywords that appear in multiple reviews, I want to rank them by the number of times they appear across reviews. For example, if people are writing reviews about cameras, the keywords might appear like this:</p> <p>expensive (appears in 7 reviews) shutter speed (appears in 5 reviews) poor image (appears in 3 reviews)</p> <p>Once I have those keywords ranked by number of reviews, I want to select 1 review per keyword and show those reviews highlighting the keyword. For example:</p> <p>"... unfortunately this camera is far too EXPENSIVE for what you get ..." (in 7 reviews) "... the SHUTTER SPEED is far too slow for ..." (in 5 reviews) "... the POOR IMAGE quality is tis cameras biggest downfall ..." (in 3 reviews)</p> <p>As far as when to run this, I'm still not sure. Possibly real time (when you view a product, then cached for X time), whenever a new review is posted, mark the product to be updated, or on a cronjob daily, etc. It will not be run against all keywords at one time, it will be run against all keywords in all reviews for a single product. Then repeated for each product.</p> <p>Hope that makes more sense.</p> <p>Any help on how to accomplish this in Solr would be greatly appreciated.</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload