Re: Excluding characters from a wildcard query

2009-07-02 Thread Chris Hostetter
: I'm not sure if you can do prefix queries with the fq parameter. You will : need to use the 'q' parameter for that. fq supports anything q supports ... with the QParser and local params options it can be any syntax you want (as long as there is a QParser for it) -Hoss

Re: Excluding characters from a wildcard query

2009-07-01 Thread Shalin Shekhar Mangar
On Wed, Jul 1, 2009 at 5:07 PM, Ben wrote: > my brain was switched off. I'm using SOLRJ, which means I'll need to > specify multiple : > > addMultipleFields(solrDoc, "vector", "vectorvalue", 1.0f); > > for each value to be added to the multiValuedField. > > Then, with luck, the simple wildcard q

Re: Excluding characters from a wildcard query

2009-07-01 Thread Ben
my brain was switched off. I'm using SOLRJ, which means I'll need to specify multiple : addMultipleFields(solrDoc, "vector", "vectorvalue", 1.0f); for each value to be added to the multiValuedField. Then, with luck, the simple wildcard query will be executed over each individual value when l

Re: Excluding characters from a wildcard query

2009-07-01 Thread Uwe Klosa
2009/7/1 Ben > I'm not quite sure I understand exactly what you mean. > The string I'm processing could have many tens of thousands of values... I > hope you aren't implying I'd need to split it into many tens of thousands of > "columns". No, that is not what I meant. It will be one field (colu

Re: Excluding characters from a wildcard query

2009-07-01 Thread Ben
I'm not quite sure I understand exactly what you mean. The string I'm processing could have many tens of thousands of values... I hope you aren't implying I'd need to split it into many tens of thousands of "columns". If you're saying what I think you're saying, you're saying that I should le

Re: Excluding characters from a wildcard query

2009-07-01 Thread Uwe Klosa
To get the desired efffect I described you have to do the split before you send the document to solr. I'm not aware of an analyzer that can split one field value into several field values. The analyzers and tokenizers do create tokens from field values in many different ways. As I see it you have

Re: Excluding characters from a wildcard query

2009-07-01 Thread Ben
Is there a way in the Schema to specify that the comma should be used to split the values up? e.g. Can I specify my "vector" field as multivalue and also specify some sort of tokeniser to automatically split on commas? Ben Uwe Klosa wrote: You should split the strings at the comma yourself

Re: Excluding characters from a wildcard query

2009-07-01 Thread Uwe Klosa
You should split the strings at the comma yourself and store the values in a multivalued field? Then wildcard search like A1_* are not a problem. I don't know so much about facets. But if they work on multivalued fields that should be then no problem at all. Uwe 2009/7/1 Ben > Yes, I had done t

Re: Excluding characters from a wildcard query

2009-07-01 Thread Ben
Yes, I had done that... however, I'm beginning to see now that what I am doing is called a "wildcard query" which is going via Lucene's queryparser. Lucene's query parser doesn't not support the regexp idea of character exclusion ... i.e. I'm not trying to match "[" I'm trying to express "Match

Re: Excluding characters from a wildcard query

2009-07-01 Thread Uwe Klosa
You have to escape all special characters. Even [ to \[ Have a look here http://lucene.apache.org/java/2_4_0/queryparsersyntax.html Uwe 2009/7/1 Ben > I only just noticed that this is an exception being thrown by the > lucene.queryParser. Should I be mailing on the lucene list, or is it ok > h

Re: Excluding characters from a wildcard query

2009-07-01 Thread Ben
I only just noticed that this is an exception being thrown by the lucene.queryParser. Should I be mailing on the lucene list, or is it ok here? I'm beginning to wonder if the "fq" can handle the type of character exclusion I'm trying in the RegExp. Escaping the string also doesn't work : Ca

Re: Excluding characters from a wildcard query - More Info - Is this difficult, or am I being ignored because it's too obvious to merit an answer?

2009-07-01 Thread Ben
Ben wrote: The exception SOLR raises is : org.apache.lucene.queryParser.ParseException: Cannot parse 'vector:_*[^_]*_[^_]*_[^_]*': Encountered "]" at line 1, column 12. Was expecting one of: "TO" ... ... ... Ben wrote: Passing in a RegularExpression like "[^_]*_[^_]*" (e.g. match

Re: Excluding characters from a wildcard query - More Info

2009-06-30 Thread Ben
The exception SOLR raises is : org.apache.lucene.queryParser.ParseException: Cannot parse 'vector:_*[^_]*_[^_]*_[^_]*': Encountered "]" at line 1, column 12. Was expecting one of: "TO" ... ... ... Ben wrote: Passing in a RegularExpression like "[^_]*_[^_]*" (e.g. matching anyth