Well, I'd like to do the following:

I've got a website full of blogposts and every blogpost has an owner, this
owner is refererred to through his/her id. For example: BloggerId = 123.
It's also possible that the blog has multiple co-writers, which are also
referred to by there BloggerId but these id's are stored in the multivalue
field, in my previous example SubIds.

When searching for a specific blogger one searches the BloggerId.
Searchresults are influenced by a number of variables, the
country/state/more specific geological data, the blogcategory, etc. For this
I use a facetted query. Next I want to make some results more important,
depending on the BloggerId, I tried to do this with the following query:

?q={!func}map(sum(map(BloggerId,12304,12304,2,0),map(BloggerId,12304,12304,1,0)),3,3,2)&fl=*,score&facet.field=Country&f.Country.facet.limit=6&facet.field=State&fq=(BlogCategory:internet%20OR%20BlogCategory:sports&sort=score%20desc,Top%20desc,%20SortPriority%20asc&start=0&omitHeader=true

In the resulting list, blogs written by BloggerId 12304 should be on top of
the list, followed by the blogs where BloggerId 12304 was co-writer. After
that, all other blogs that follow the criteria but aren't written (or
co-written) by BloggerId 12304.

Any ideas? Thanks!

--
View this message in context: 
http://lucene.472066.n3.nabble.com/Using-multivalued-field-in-map-function-tp3318843p3322023.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to