On Aug 2, 2011, at 1:09 PM, Suk-Hyun Cho [via Lucene] wrote:

> I appreciate your replies and ideas. 
> 
> SpanQuery would work, and I'll look into this further. However, what about 
> the original question? Is there no way to match documents on a per-element 
> basis against a multivalued field?

Correct; there is no way.  Aside from Solr 4's "Join" feature, everything else 
suggested is a hack / work-around for a fundamental limitation.  

> If not, would it perhaps make sense to create a feature request? 

You could but I wouldn't bother because its unlikely to get any traction as 
it's a fundamental issue with Lucene and at the Solr level there is a solution 
on the horizon.

> Also, regarding the join support you guys have mentioned: is it only on a 
> field within the same core, or is it across cores (as if cores are tables in 
> a database)? Joining on cores would eliminate most of the issues I'm having. 
> The examples I gave are simplified, but actually I have an entity A that has 
> entity B that has entity C, and I'm flattening out queriable fields of B and 
> C into the schema for A. This way, I can search for documents for the core A 
> that match some criteria for A, B, and/or C. 

The Join support works across cores.  See the wiki and associated JIRA issue 
for it.

~ David Smiley



-----
 Author: https://www.packtpub.com/solr-1-4-enterprise-search-server/book
--
View this message in context: 
http://lucene.472066.n3.nabble.com/Matching-queries-on-a-per-element-basis-against-a-multivalued-field-tp3217432p3219638.html
Sent from the Solr - User mailing list archive at Nabble.com.

Reply via email to