Re: Matching on a multi valued field

2011-04-05 Thread Renaud Delbru
Hi, you could try the SIREn plugin [1] which supports multi-valued fields. [1] http://siren.sindice.com -- Renaud Delbru On 29/03/11 21:57, Brian Lamb wrote: Hi all, I have a field set up like this: And I have some records: RECORD1 man's best friend pooch RECORD2 man's worst

Re: Matching on a multi valued field

2011-04-05 Thread Michael Sokolov
Could you try creating fields dynamically: common_names_1, common_names_2, etc. Keep track of the max number of fields and generate queries listing all the fields? Gross, but it handles all the cases mentioned in the thread (wildcards, phrases, etc). -Mike On 3/29/2011 4:57 PM, Brian Lamb

Re: Matching on a multi valued field

2011-04-04 Thread Jonathan Rochkind
On 4/4/2011 3:21 PM, Brian Lamb wrote: I just noticed Juan's response and I find that I am encountering that very issue in a few cases. Boosting is a good way to put the more relevant results to the top but it is possible to only have the correct results returned? Only what's already been said

Re: Matching on a multi valued field

2011-04-04 Thread Juan Pablo Mora
I have not find any solution to this. The only thing is to denormalize your multivalue field into several docs with a single value field. Try ComplexPhraseQueryParser (https://issues.apache.org/jira/browse/SOLR-1604) if you are using solr 1.4 version. El 04/04/2011, a las 21:21, Brian Lamb esc

Re: Matching on a multi valued field

2011-04-04 Thread Brian Lamb
I just noticed Juan's response and I find that I am encountering that very issue in a few cases. Boosting is a good way to put the more relevant results to the top but it is possible to only have the correct results returned? On Wed, Mar 30, 2011 at 11:51 AM, Brian Lamb wrote: > Thank you all for

Re: Matching on a multi valued field

2011-03-30 Thread Brian Lamb
Thank you all for your responses. The field had already been set up with positionIncrementGap=100 so I just needed to add in the slop. On Tue, Mar 29, 2011 at 6:32 PM, Juan Pablo Mora wrote: > >> A multiValued field > >> is actually a single field with all data separated with > positionIncrement

Re: Matching on a multi valued field

2011-03-29 Thread Juan Pablo Mora
>> A multiValued field >> is actually a single field with all data separated with positionIncrement. >> Try setting that value high enough and use a PhraseQuery. That is true but you cannot do things like: q="bar* foo*"~10 with default query search. and if you use dismax you will have the same

Re: Matching on a multi valued field

2011-03-29 Thread Markus Jelsma
orly, all replies came in while sending =) > Hi, > > Your filter query is looking for a match of "man's friend" in a single > field. Regardless of analysis of the common_names field, all terms are > present in the common_names field of both documents. A multiValued field > is actually a single fi

Re: Matching on a multi valued field

2011-03-29 Thread Markus Jelsma
Hi, Your filter query is looking for a match of "man's friend" in a single field. Regardless of analysis of the common_names field, all terms are present in the common_names field of both documents. A multiValued field is actually a single field with all data separated with positionIncrement. T

Re: Matching on a multi valued field

2011-03-29 Thread Savvas-Andreas Moysidis
my bad..just realised your problem.. :D On 29 March 2011 22:07, Savvas-Andreas Moysidis < savvas.andreas.moysi...@googlemail.com> wrote: > I assume you are using the Standard Handler? > In that case wouldn't something like: > "q=common_names:(man's friend)&q.op=AND" work? > > On 29 March 2011 21:

Re: Matching on a multi valued field

2011-03-29 Thread Erick Erickson
Two things need to be done. First, define positionIncrementGap (see http://wiki.apache.org/solr/SchemaXml) for the field. Then use phrase searches with the slop less than what you've defined for positionIncrementGap. Of course you'll have to have a positionIncrementGap larger than the number of t

Re: Matching on a multi valued field

2011-03-29 Thread Savvas-Andreas Moysidis
I assume you are using the Standard Handler? In that case wouldn't something like: "q=common_names:(man's friend)&q.op=AND" work? On 29 March 2011 21:57, Brian Lamb wrote: > Hi all, > > I have a field set up like this: > > stored="true" required="false" /> > > And I have some records: > > RECOR

Re: Matching on a multi valued field

2011-03-29 Thread Jonathan Rochkind
As far as I know, there's no support in Solr for "all words must match in the same value of a multi-valued field". I agree it would be useful in some cases. As long as you don't need to do an _actual_ phrase search, you can kind of fake it by using a phrase query, with the query slop set so hi