I don't think this field collapsing can simply solve my problem after second
thought.

As I mentioned, user only type in a search phrase, and click on search. 
Underlying that, the application logic is going to compose search query
against multiple fields (title_name, actors, directors, ...) by the search
phrase/term.

Therefore, search result can match search term with any of the fields above. 
However, for all results due to actor name match, i want to make a group
which only list the first two actors.  for that group, i want to put it to
the right spot of the result based on the relevancy score of the best actor
match.  

For example, if i search  a keyword "Tom" (term match as well fuzzy match). 
there are matching result  based on video title name as well as actor name 

result 1:  <--  title match
score: 1.0
title_name: tom's story
actor: jamie lee

result 2:  <--  title match
score: 0.95
title_name: tom green's store
actor: joanne anderson

result 3:  <-- actor match
actor 2: tommy jackson  -- score: 0.5
actor 1:  tim robin   -- score: 0.4
See all actors match "Tom"

result 4:   <-- title match
score: 0.333
title_name: atom theory
actor: kevin sheen
  


in this case, field collapsing can only achieve this:  out of search result,
It will list out all actors as long as there is title or actor match.  For 
example:

Assume only show top 2 result in each group
group value: Anglelina Jolie  
          numFound:13
              
                id:1,
                title_name:tom's story
              
                id:2,
                title_name:tom green's store

group value: tommy jackson
          numFound:1              
                id: 201,
                title_name: ...              



group value: kevin sheen
          numFound:1              
                id: 30,
                title_name:  atom theory
            


<-- even if Angelina Jolie not in the result because of actor name match. 
but because her movie title  matching "tom" with highest relevance.  she
will still be number 1 group.   This is different than what i expected.  
-- 
View this message in context: 
http://lucene.472066.n3.nabble.com/How-to-group-result-when-search-on-multiple-fields-tp2358441p2368496.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to