lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tkamphuis <tom_m...@hotmail.com>
Subject Using multivalued field in map function
Date Thu, 08 Sep 2011 06:34:07 GMT
Hi,

I'm working on implementing Solr in a project and right now I'm stuck on a
specific search including an arr field. The thing is:

I'd like to search sub-id's on an object, these sub-id's are stored in a
multivalue field, e.g.:
<arr name="SubIds">
   <int>12272</int>
   <int>12304</int>
   <int>12306</int>
</arr>

The query (or part of the query) that I want to use is as follows:
map(SubIds,i,i,1,0)

When I, for example, fill 12304 on the 'i' space in the map function above,
I would expect my function to return 1. If I would enter 12345 it should
return 0. The thing is that when I run this query it returns 0, or "There's
no number 12304 in this field, I return 0". 

When removing the 0 from my map function I can see the actual value returned
to me (when 12304 return 1, when different return value), in this case
that's 12306! I've tried this with some different multivalued fields but the
result is the same; it looks like the function is checking the last value in
the multivalue field against my filled in ID.

Is this true? And when it does, is there any way in looking through the
whole arr and only return 0 when the value doesn't exist in the whole
multivalued field?

Thanks!

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

Mime
View raw message