Re: Problem using wildcardsearch in phrase search

2007-05-18 Thread Paul Taylor
Ive proposed a simple improvement in issue https://issues.apache.org/jira/browse/LUCENE-884 thanks Paul Chris Hostetter wrote: But as i said: if you have suggestions for clarifying the docs, please submit them as a patch. just saying the docs need to be improved without providing a specific

Re: Problem using wildcardsearch in phrase search

2007-05-14 Thread Chris Hostetter
: queryparsersyntax page which is where I expect most novices (such as : myself) start with lucene seems to indicate that wildcards can be used : in, and this page is : as far as one should need to go to understand basic query syntax, this : page should be corrected. if you have a suggestion for

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Paul Taylor
Chris Hostetter wrote: : > You can't use a wildcard within double quotes. The Lucene syntax : > grammar does not look for such things. : This is the bit I don't get (I have got round the problem), why can't : you use wildcards within double quotes, this isnt mentioned anywhere in : http://lucene

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Chris Hostetter
: > You can't use a wildcard within double quotes. The Lucene syntax : > grammar does not look for such things. : This is the bit I don't get (I have got round the problem), why can't : you use wildcards within double quotes, this isnt mentioned anywhere in : http://lucene.apache.org/java/docs/qu

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Mark Miller
I do not know enough about PhraseQuery to say how hard it would be to add support for wildcards, but I am sure there is some method of doing it -- it has just not been done. From what I can tell it would be easier to stop using PhraseQuery and use SpanQuery's if you wanted to do this. Maybe som

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Paul Taylor
Mark Miller wrote: You cannot use wildcards in quotes simply because the QueryParser syntax does not look for such things...at the top level it is either looking for a Wildcard token OR a Quoted token. There is good reason for this: a phrase query does not support wildcards. OK thanks for all t

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Mark Miller
You cannot use wildcards in quotes simply because the QueryParser syntax does not look for such things...at the top level it is either looking for a Wildcard token OR a Quoted token. There is good reason for this: a phrase query does not support wildcards. The hack that I suggested (looking for

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Paul Taylor
Mark Miller wrote: You can't use a wildcard within double quotes. The Lucene syntax grammar does not look for such things. This is the bit I don't get (I have got round the problem), why can't you use wildcards within double quotes, this isnt mentioned anywhere in http://lucene.apache.org/java

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Mark Miller
I think the KeywordAnlyser bit is maybe a red herring, the problem seems to be that you cant use * within double quotes, I made some changes to my data and index to remove the space character You can't use a wildcard within double quotes. The Lucene syntax grammar does not look for such thin

RE: Problem using wildcardsearch in phrase search

2007-05-13 Thread Max Metral
@lucene.apache.org Subject: Re: Problem using wildcardsearch in phrase search I think the KeywordAnlyser bit is maybe a red herring, the problem seems to be that you cant use * within double quotes, I made some changes to my data and index to remove the space character If I fed 54:puid* to my code

Re: Problem using wildcardsearch in phrase search

2007-05-13 Thread Paul Taylor
I think the KeywordAnlyser bit is maybe a red herring, the problem seems to be that you cant use * within double quotes, I made some changes to my data and index to remove the space character If I fed 54:puid* to my code it generates a Prefix Query and works as required Search Query Is54:puid

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Mark Miller
Perhaps not like whitespaceanalyzer does in all cases, but this code QueryParser qp = new QueryParser("field", new WhitespaceAnalyzer()); Query q = qp.parse("Does this tokenize*"); System.out.println(q.toString()); produces field:Does field:this field:token

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Erick Erickson
See below On 5/12/07, Mark Miller <[EMAIL PROTECTED]> wrote: Paul Taylor wrote: > I seem to be having problems using a * in a phrase term query > > This is my search String, its not finding any matches > 54:"MusicIP PUID*" > > If I match on a particular record it works ok > 54:"MusicIP PU

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Mark Miller
This just keeps running around in my head... I was wrong on one point...if you use the KeywordAnalyzer and you put your search in quotes then you will not generate a phrase query because a PhraseQuery is only generated if the analyzer produces more than one token. The problem is that, instead

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Mark Miller
Well I am confused so I suppose I'll let someone else give it a shot. Just in case though...if you are using the query: fieldname:"MusicIP Puid*" Then you should not...you need to leave out the quotes...quotes create a phrasequery, and a phrasequery will not match what is in your index. This may

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Paul Taylor
Mark Miller wrote: Didn't you say you where using a phrasequery? If you are, things will not work as expected. You need to leave the quotes out of your search as a phrasequery will not match what you are putting in your index. If you are not using a phrasequery then things should work as you wo

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Mark Miller
Paul Taylor wrote: Mark Miller wrote: "MusicIP PUID*" means to search for MusicIP within one of PUID* Sorry I dont understand, can you give me a further reference ...I am pretty sure that KeywordAnalyzer does not split on whitespace like WhiteSpaceAnalyzer does...which means that MusicIP is

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Paul Taylor
Mark Miller wrote: "MusicIP PUID*" means to search for MusicIP within one of PUID* Sorry I dont understand, can you give me a further reference ...I am pretty sure that KeywordAnalyzer does not split on whitespace like WhiteSpaceAnalyzer does...which means that MusicIP is never within one of

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Mark Miller
Paul Taylor wrote: I seem to be having problems using a * in a phrase term query This is my search String, its not finding any matches 54:"MusicIP PUID*" If I match on a particular record it works ok 54:"MusicIP PUIDa39494bf-927e-1638-fb06-782ec55ac22d" "MusicIP PUID*" means to search for Mu

Re: Problem using wildcardsearch in phrase search

2007-05-12 Thread Erick Erickson
Somewhere in the list, I remember one of the guys who know what they're talking about mentions something about KeywordAnalyzer being "subject to the meta-semantics of the QueryParser". So try looking at query.toString() in your example. What I think you'll find is that KeywordAnalyzer doesn't qui