Re: Help on the Query Parser

2004-11-24 Thread Daniel Naber
On Wednesday 24 November 2004 08:16, Morus Walter wrote: Lucene itself doesn't handle wildcards within phrases. This can be added using PhrasePrefixQuery (which is slightly misnamed): http://jakarta.apache.org/lucene/docs/api/org/apache/lucene/search/PhrasePrefixQuery.html Regards Daniel

RE: Re: Help on the Query Parser

2004-11-24 Thread Terence Lai
Hi Daniel, I couldn't figure out how to use the PharsePrefixQuery with a phase like java* developer. It only provides method to add terms. Can a term contain wildcard character in lucene? Thanks, Terence On Wednesday 24 November 2004 08:16, Morus Walter wrote: Lucene itself doesn't

RE: Re: Help on the Query Parser

2004-11-24 Thread Terence Lai
Hi Morus, I want to search for the string like below: - java developer - javascript developer By searching java*, it will return more than I want. That's why I am thinking java* developer. Terence Terence Lai writes: Look likes that the wildcard query disappeared. In fact, I am

Help on the Query Parser

2004-11-23 Thread Terence Lai
Hi all, I am trying to use the QueryParser.parse() to parse a query string like java* developer. Note that I want the wildcard string, java*, followed by the word developer. The following is the code. - String qryStr = \java* developer\; String fieldname = text; StandardAnalyzer

Re: Help on the Query Parser

2004-11-23 Thread Morus Walter
Terence Lai writes: Look likes that the wildcard query disappeared. In fact, I am expecting text:java* developer to be returned. It seems to me that the QueryParser cannot handle the wildcard within a quoted String. That's not just QueryParser. Lucene itself doesn't handle wildcards

HOWTO USE SORT on QUERY PARSER :)

2004-07-14 Thread Karthik N S
To: Lucene Users List Subject: Re: HOWTO USE SORT on QUERY PARSER :( example: query = QueryParser.parse(queryString, FIELD_CONTENTS, analyzer); Sort sort =new Sort(); sort.setSort(FIELD_DATE,true); //hits = searcher.search(query,sort); hits

Re: extensible query parser - Re: Proximity Searches behavior

2004-06-10 Thread Erik Hatcher
On Jun 9, 2004, at 4:39 PM, David Spencer wrote: I like the idea of a flexible run-time grammar, but it sounds too good to be true in a general purpose kinda way. My idea isn't perfect for humans, but at least lets you use queries not hard coded. But in my idealistic view, getting something

Re: extensible query parser - Re: Proximity Searches behavior

2004-06-10 Thread Otis Gospodnetic
] To: Lucene Users List [EMAIL PROTECTED] Sent: Thursday, June 10, 2004 5:04 AM Subject: Re: extensible query parser - Re: Proximity Searches behavior On Jun 9, 2004, at 4:39 PM, David Spencer wrote: I like the idea of a flexible run-time grammar, but it sounds too good to be true

Re: extensible query parser - Re: Proximity Searches behavior

2004-06-10 Thread Erik Hatcher
On Jun 10, 2004, at 10:26 AM, Terry Steichen wrote: Erik, When is Lucene in Action scheduled to be out? To add to what Otis said - I've been working feverishly to come to terms with SpanQuery*, the new sorting feature, Highlighter, Nutch analysis and much more. Lucene in Action will be accurate

extensible query parser - Re: Proximity Searches behavior

2004-06-09 Thread David Spencer
] example of registration register( substring, new SubstringQP()); // instead of prefix matches allows term anywhere register( span, new SurroundQP()); register( syn, new SynonymExpanderQP()); // expands a word to include synonyms [4] syntax normal query parser syntax but add something else like NAME

Memo: Re: RE: RE: Query parser and minus signs

2004-05-27 Thread alex . bourne
: Subject:Re: RE: RE: Query parser and minus signs On May 26, 2004, at 10:48 AM, [EMAIL PROTECTED] wrote: Query: hsbc -language:zh-HK Parsed query: (contents:hsbc -language:zh -contents:hk) (keywords:hsbc -language:zh -keywords:hk) (title:hsbc -language:zh -title:hk) (language:hsbc

Memo: RE: RE: Query parser and minus signs

2004-05-26 Thread alex . bourne
looks OK at least to a relative beginner like myself), and also through the search code but I'm still none the wiser. Am I doing something wrong, or have I completely missed the point ?? To:Alex BOURNE/IBEU/[EMAIL PROTECTED] cc: bcc: Subject:RE: RE: Query parser and minus signs

Re: Memo: RE: RE: Query parser and minus signs

2004-05-26 Thread Erik Hatcher
?? To:Alex BOURNE/IBEU/[EMAIL PROTECTED] cc: bcc: Subject:RE: RE: Query parser and minus signs remember luke does not display the indexed tokens but the stored field. So you would expect to see en-uk in the field. doc.add(Field.Keyword(locale,test-uk)); are you adding to the document like

Memo: Re: RE: RE: Query parser and minus signs

2004-05-26 Thread alex . bourne
it just become part of the query?? Erik Hatcher [EMAIL PROTECTED] on 26 May 2004 15:11 Please respond to Lucene Users List [EMAIL PROTECTED] To:Lucene Users List [EMAIL PROTECTED] cc: bcc: Subject:Re: RE: RE: Query parser and minus signs What is the value of your Parsed query

Re: Memo: Re: RE: RE: Query parser and minus signs

2004-05-26 Thread Erik Hatcher
On May 26, 2004, at 10:48 AM, [EMAIL PROTECTED] wrote: Query: hsbc -language:zh-HK Parsed query: (contents:hsbc -language:zh -contents:hk) (keywords:hsbc -language:zh -keywords:hk) (title:hsbc -language:zh -title:hk) (language:hsbc -language:zh -language:HK) Hits: 169 Not quite what I was

RE: RE: Query parser and minus signs

2004-05-24 Thread alex . bourne
respond to Lucene Users List [EMAIL PROTECTED] To:Lucene Users List [EMAIL PROTECTED] cc: bcc: Subject:RE: RE: Query parser and minus signs Doesn't en UK as a phrase query work? You're probably indexing it as a text field so it's being tokenised. -Original Message- From: [EMAIL

Re: Query parser and minus signs

2004-05-24 Thread Erik Hatcher
On May 24, 2004, at 4:50 AM, [EMAIL PROTECTED] wrote: I tried this, but no it does not work. I'm concerned that escaping the minus symbol does not appear to work. The field is indexed as a keyword so is not tokenized - I've checked the contents using luke which confirms this. You will need to

Query parser and minus signs

2004-05-21 Thread alex . bourne
Hi All, I'm using Lucene on a site that has split content with a branch containing pages in English and a separate branch in Chinese. Some of the chinese pages include some (untranslatable) English words, so when a search is carried out in either language you can get pages from the wrong

RE: Query parser and minus signs

2004-05-21 Thread Ryan Sonnek
if you're dealing with locales, why not use java's built in locale syntax (ex: en_UK, zh_HK)? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:36 AM To: [EMAIL PROTECTED] Subject: Query parser and minus signs Hi All

Memo: RE: Query parser and minus signs

2004-05-21 Thread alex . bourne
PROTECTED] cc: bcc: Subject:RE: Query parser and minus signs if you're dealing with locales, why not use java's built in locale syntax (ex: en_UK, zh_HK)? -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Friday, May 21, 2004 10:36 AM To: [EMAIL PROTECTED

Re: Query parser and minus signs

2004-05-21 Thread Peter M Cipollone
- Original Message - From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, May 21, 2004 11:36 AM Subject: Query parser and minus signs Hi All, I'm using Lucene on a site that has split content with a branch containing pages in English and a separate branch in Chinese

RE: Memo: RE: Query parser and minus signs

2004-05-21 Thread David Townsend
Doesn't en UK as a phrase query work? You're probably indexing it as a text field so it's being tokenised. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 21 May 2004 16:47 To: Lucene Users List Subject: Memo: RE: Query parser and minus signs Hmm, we may

Re: What is the status of Query Parser AND / OR ?

2004-02-11 Thread Morus Walter
Daniel B. Davis writes: There was a lot of correspondence during December about this. Is there any further resolution? There's a patch and I hope it will find it's way into the lucene sources. see: http://issues.apache.org/bugzilla/show_bug.cgi?id=25820 Seems I missed the mail about Otis

Re: Query Parser AND / OR

2003-12-30 Thread Morus Walter
, one for default or, one for default and). Maybe it's obvious, but I fail to see it. As far as the actual patch, I would suspect that a better approach than using java would be to use precedence operations in the actual parser. Then you decide to do a complete rewrite of the query parser

Re: Query Parser AND / OR

2003-12-30 Thread Dror Matalon
Is there another interpretation? As far as the actual patch, I would suspect that a better approach than using java would be to use precedence operations in the actual parser. Then you decide to do a complete rewrite of the query parser. That's something I wanted to avoid. Ouch. I

Re: Query Parser AND / OR

2003-12-30 Thread Morus Walter
of these, as it handles the default operator on the same level as AND. As far as the actual patch, I would suspect that a better approach than using java would be to use precedence operations in the actual parser. Then you decide to do a complete rewrite of the query parser. That's something I

Re: Query Parser AND / OR

2003-12-30 Thread Erik Hatcher
On Dec 30, 2003, at 3:13 PM, Morus Walter wrote: Hmm. That's be up to the developers. Don't know how many of them are reading lucene-user. I suspect we're all here! QueryParser is Lucene's red-headed step-child. It works well enough, but it has more than its share of issues. It is almost a

Re: Query Parser AND / OR

2003-12-30 Thread Dror Matalon
On Tue, Dec 30, 2003 at 03:25:08PM -0500, Erik Hatcher wrote: On Dec 30, 2003, at 3:13 PM, Morus Walter wrote: Hmm. That's be up to the developers. Don't know how many of them are reading lucene-user. I suspect we're all here! Great. QueryParser is Lucene's red-headed step-child. It

Re: Query Parser AND / OR

2003-12-30 Thread Dror Matalon
decide to do a complete rewrite of the query parser. That's something I wanted to avoid. Ouch. I think you might be right. It might be a good idea to move this discussion to lucene-dev where we'd get more attention from the developers. This seems more like a developer issue than a user issue

Re: Query Parser AND / OR

2003-12-30 Thread Morus Walter
of serializing an arbitray query to a parsable string in standard query parser syntax. So for completeness and compatibility with the current query parser, I would keep the current behaviour of queries without explicit boolean operators. The problem for users isn't that big IMHO. Unless a user

Re: Query Parser AND / OR

2003-12-30 Thread Dror Matalon
AND or OR There's some redundancy between all three, and it's quite easy to get confused. A consequence of pure boolean operators is, that there won't be a way of serializing an arbitray query to a parsable string in standard query parser syntax. So for completeness and compatibility with the current

Re: Query Parser AND / OR

2003-12-29 Thread Dror Matalon
my $.02. Before having patches, I think it's a good idea to agree on what the right solution is. Most of it is obvious using boolean logic, but we have some additional requirements like not having a query that only has a NOT clause. Is this the only exception? As far as the actual patch, I

RE: Query Parser AND / OR

2003-12-28 Thread Morus Walter
implicit priority. I had a closer look at this and wrote a patch, that implements this by changing the vector of boolean clauses into a vector of vectors of boolean clauses in the addClause method of the query parser. A new sub-vector is created whenever an explicit OR operator is used. Queries using

RE: Query Parser AND / OR

2003-12-28 Thread Morus Walter
Morus Walter writes: I attached the patch (made against 1.3rc3 but working for 1.3final as well) and a test program. Seems the attachments got stripped... So once again: The patch: ===File lucene/QueryParser.jj.patch=== *** QueryParser.jj.org Mon Dec 22 11:47:30 2003 ---

Re: Query Parser AND / OR

2003-12-10 Thread Morus Walter
Hi Dror, thanks for your answer. I'm having problems understanding query parsers handling of AND and OR if there's more than one operator. E.g. a OR b AND c gives the same number of hits as b AND c (only scores are different) This would make sense if all the document that

RE: Query Parser AND / OR

2003-12-10 Thread Jamie Stallwood
Message- From: Morus Walter [mailto:[EMAIL PROTECTED] Sent: 10 December 2003 09:01 To: Lucene Users List Subject: Re: Query Parser AND / OR Hi Dror, thanks for your answer. I'm having problems understanding query parsers handling of AND and OR if there's more than one operator. E.g

Query Parser AND / OR

2003-12-09 Thread Morus Walter
Hi, I'm having problems understanding query parsers handling of AND and OR if there's more than one operator. E.g. a OR b AND c gives the same number of hits as b AND c (only scores are different) and a AND b OR c AND d seems to be equivalent to a AND b AND C AND d which doesn't seem logical

Re: Query Parser AND / OR

2003-12-09 Thread Dror Matalon
On Tue, Dec 09, 2003 at 10:57:51AM +0100, Morus Walter wrote: Hi, I'm having problems understanding query parsers handling of AND and OR if there's more than one operator. E.g. a OR b AND c gives the same number of hits as b AND c (only scores are different) This would make sense if

Boost in Query Parser

2003-11-12 Thread MOYSE Gilles (Cetelem)
Hello. I've made a Filter which recognizes special words and return them in a boosted form, in a QueryParser sense. For instance, when the filter receives special_word, it returns special_word^3, so as to boost it. The problem is that the QueryParser understands the boost syntax when the string

Re: Boost in Query Parser

2003-11-12 Thread Erik Hatcher
On Wednesday, November 12, 2003, at 10:53 AM, MOYSE Gilles (Cetelem) wrote: Hello. I've made a Filter which recognizes special words and return them in a boosted form, in a QueryParser sense. For instance, when the filter receives special_word, it returns special_word^3, so as to boost it. The

query parser operator precedence and strange result

2003-08-14 Thread Morus Walter
Hi, im currently trying to understand how the standard query parser handles operator precedence in a query like a OR b AND c OR d This is output by the toString method as a +b +c d so AND seems to have higher precedence than OR Now if I try to check this and look at a OR ( b AND c ) OR d I see

Alternate Boolean Query Parser?

2003-03-28 Thread Shah, Vineel
One of my clients is asking for an old-style boolean query search on my keywords fields. A string might look like this: oracle admin* and java and oracle and (8.1.6 or 8.1.7) and (solaris or unix or linux) There would probably be need for nested parenthesis, although I can't think of

Re: Alternate Boolean Query Parser?

2003-03-28 Thread Tatu Saloranta
On Friday 28 March 2003 15:48, Shah, Vineel wrote: One of my clients is asking for an old-style boolean query search on my keywords fields. A string might look like this: oracle admin* and java and oracle and (8.1.6 or 8.1.7) and (solaris or unix or linux) There would probably be need

regarding Query parser for relational operators

2003-02-03 Thread Nellai
Hi, Is there any way to filter the search based on the modified date. For example, i need to fetch only those documents whose modified date or or between. Can any one help me to solve this. Thanks a ton Nellai...

Re: Query parser error

2002-05-30 Thread Peter Carlson
Try using the newest release and read the Queryparser syntax. http://jakarta.apache.org/lucene/docs/queryparsersyntax.html Escape characters were just added. --Peter On 5/29/02 10:53 PM, Harpreet S Walia [EMAIL PROTECTED] wrote: Hi I am trying to search words which have characters { ,

Query parser error

2002-05-29 Thread Harpreet S Walia
Hi I am trying to search words which have characters { , [ etc in them . I am using the standard lucene jar (V 1.2-rc4 ). when i search for the words having these charcters i get a exception saying org.apache.lucene.queryParser.TokenMgrError: Lexical error at line 1, column 8. Encountered:

RE: query parser deafults

2002-05-23 Thread Halcsy Pter
: query parser deafults I've been looking at the query parser source code and have come to a loose end. Not surprising! Many people have a hard time wrapping their head around parsers; the logic is not straightforward. I'm attempting to modify the query parser so that all terms

query parser deafults

2002-05-21 Thread Richard Taylor
Hi, I've been looking at the query parser source code and have come to a loose end. I'm attempting to modify the query parser so that all terms default to required. Please can someone advise how to do this. Thanks, Richard Taylor New Scientist Developer

Re: Query Parser Syntax documentation now available

2002-05-16 Thread William W
, William. From: Peter Carlson [EMAIL PROTECTED] Reply-To: Lucene Users List [EMAIL PROTECTED] To: Lucene Users List [EMAIL PROTECTED] CC: Lucene Developers List [EMAIL PROTECTED] Subject: Query Parser Syntax documentation now available Date: Wed, 15 May 2002 22:22:47 -0700 Lucene supports creating

Query Parser Syntax documentation now available

2002-05-15 Thread Peter Carlson
Lucene supports creating your own query syntax, but also provides a default QueryParser implementation using JavaCC to parse query strings into Lucene Query objects. In hopes to provide some better understanding, there is now a Query Parser Syntax document available which describes the features