You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by "Natarajan.T" <na...@crimsonlogic.co.in> on 2004/09/14 11:25:38 UTC

Search PharseQuery

Hi All,

 

How do I implement PharseQuery API? Pls send me some sample code.( How
can I handle "java is platform" as single word?

)

  

Regards,

Natarajan.

 

 


Re: Search PharseQuery

Posted by sergiu gordea <gs...@ifit.uni-klu.ac.at>.
Natarajan.T wrote:

>Ok you are correct ...
>
>
>Suppose if I type "what java" then how can I handle...
>  
>
You don't have to handle it, lucene does it. If you don't like how 
lucene handles it then you may extend
the functionality.

 If you use the same analyzer for indexing and searching then you will 
find the results with both search strings:

"what java" and "what is java".
At least I obtain them in both cases. 
That's right you will obtain 
"what java" if you search for "what is java", in my case is acceptable.

If it is not acceptable in your project, I suggest to try to create a new Analyzer.

  I whish you luck,

  Sergiu







>Regards,
>Natarajan.
>
>-----Original Message-----
>From: sergiu gordea [mailto:gsergiu@ifit.uni-klu.ac.at] 
>Sent: Tuesday, September 14, 2004 7:38 PM
>To: Lucene Users List
>Subject: Re: Search PharseQuery
>
>Natarajan.T wrote:
>
>  
>
>>Hi,
>>
>>Thanks for your response.....
>>
>>For example search keyword is like below...
>>
>>Language "what is java"
>>
>>Token 1:  language
>>Token 2: what is java(like google)
>>
>>
>>Regards,
>>Natarajan.
>>
>> 
>>
>>    
>>
>Lucene works exaclty as you describe above with a simple correction ...
>
> The analyzer has a list of  stopped keywords, and I bet "is" is one of
>
>them for your analyzer.
>I don't mind right now about this, so I won't dig to find a solution for
>
>this problem, but the resolution
>should be searched around Analyzer classes.
> All the best,
>
>  Sergiu
>
>
>
>
>  
>
>>
>>-----Original Message-----
>>From: Aad Nales [mailto:aad.nales@rotterdam-cs.com] 
>>Sent: Tuesday, September 14, 2004 5:19 PM
>>To: 'Lucene Users List'
>>Subject: RE: Search PharseQuery
>>
>>Hi,
>>
>>Not sure if this is what you need but I created a lastname filter which
>>in Dutch means potential double last names like:"van der Vaart". In
>>order to process these I created a finite state machine that queried
>>these last names. Since I only needed the filter on 'index' time and I
>>never use it for querieying, this may not be what you are looking for.
>>It should be simple to index 'what is java' as a single token and to
>>search for that same token. However, you will need to create a list of
>>accepted 'tokens'. If this is what you need let me know, I will make
>>    
>>
>the
>  
>
>>code available...
>>
>>cheers,
>>Aad Nales
>>
>>-----Original Message-----
>>From: Honey George [mailto:honey_george@yahoo.com] 
>>Sent: Tuesday, 14 September, 2004 13:39
>>To: Lucene Users List
>>Subject: Re: Search PharseQuery
>>
>>
>>--- "Natarajan.T" <na...@crimsonlogic.co.in>
>>wrote: 
>> 
>>
>>    
>>
>>>Hi All,
>>>
>>>
>>>
>>>How do I implement PharseQuery API?
>>>   
>>>
>>>      
>>>
>>What exactly you mean by implement? Are you trying to
>>extend the current behavior or only trying find out
>>the usage?
>>Thanks,
>> George
>>
>>
>>
>>	
>>	
>>		
>>___________________________________________________________ALL-NEW
>>Yahoo! Messenger - all new features - even more fun!
>>http://uk.messenger.yahoo.com
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>>
>>
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>>
>>---------------------------------------------------------------------
>>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>>
>> 
>>
>>    
>>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: Search PharseQuery

Posted by "Natarajan.T" <na...@crimsonlogic.co.in>.
Ok you are correct ...


Suppose if I type "what java" then how can I handle...

Regards,
Natarajan.

-----Original Message-----
From: sergiu gordea [mailto:gsergiu@ifit.uni-klu.ac.at] 
Sent: Tuesday, September 14, 2004 7:38 PM
To: Lucene Users List
Subject: Re: Search PharseQuery

Natarajan.T wrote:

>Hi,
>
>Thanks for your response.....
>
>For example search keyword is like below...
>
>Language "what is java"
>
>Token 1:  language
>Token 2: what is java(like google)
>
>
>Regards,
>Natarajan.
>
>  
>
Lucene works exaclty as you describe above with a simple correction ...

 The analyzer has a list of  stopped keywords, and I bet "is" is one of

them for your analyzer.
I don't mind right now about this, so I won't dig to find a solution for

this problem, but the resolution
should be searched around Analyzer classes.
 All the best,

  Sergiu




>
>
>
>-----Original Message-----
>From: Aad Nales [mailto:aad.nales@rotterdam-cs.com] 
>Sent: Tuesday, September 14, 2004 5:19 PM
>To: 'Lucene Users List'
>Subject: RE: Search PharseQuery
>
>Hi,
>
>Not sure if this is what you need but I created a lastname filter which
>in Dutch means potential double last names like:"van der Vaart". In
>order to process these I created a finite state machine that queried
>these last names. Since I only needed the filter on 'index' time and I
>never use it for querieying, this may not be what you are looking for.
>It should be simple to index 'what is java' as a single token and to
>search for that same token. However, you will need to create a list of
>accepted 'tokens'. If this is what you need let me know, I will make
the
>code available...
>
>cheers,
>Aad Nales
>
>-----Original Message-----
>From: Honey George [mailto:honey_george@yahoo.com] 
>Sent: Tuesday, 14 September, 2004 13:39
>To: Lucene Users List
>Subject: Re: Search PharseQuery
>
>
> --- "Natarajan.T" <na...@crimsonlogic.co.in>
>wrote: 
>  
>
>>Hi All,
>>
>> 
>>
>>How do I implement PharseQuery API?
>>    
>>
>
>What exactly you mean by implement? Are you trying to
>extend the current behavior or only trying find out
>the usage?
>Thanks,
>  George
>
>
>
>	
>	
>		
>___________________________________________________________ALL-NEW
>Yahoo! Messenger - all new features - even more fun!
>http://uk.messenger.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Search PharseQuery

Posted by sergiu gordea <gs...@ifit.uni-klu.ac.at>.
Natarajan.T wrote:

>Hi,
>
>Thanks for your response.....
>
>For example search keyword is like below...
>
>Language "what is java"
>
>Token 1:  language
>Token 2: what is java(like google)
>
>
>Regards,
>Natarajan.
>
>  
>
Lucene works exaclty as you describe above with a simple correction ...

 The analyzer has a list of  stopped keywords, and I bet "is" is one of  
them for your analyzer.
I don't mind right now about this, so I won't dig to find a solution for 
this problem, but the resolution
should be searched around Analyzer classes.
 All the best,

  Sergiu




>
>
>
>-----Original Message-----
>From: Aad Nales [mailto:aad.nales@rotterdam-cs.com] 
>Sent: Tuesday, September 14, 2004 5:19 PM
>To: 'Lucene Users List'
>Subject: RE: Search PharseQuery
>
>Hi,
>
>Not sure if this is what you need but I created a lastname filter which
>in Dutch means potential double last names like:"van der Vaart". In
>order to process these I created a finite state machine that queried
>these last names. Since I only needed the filter on 'index' time and I
>never use it for querieying, this may not be what you are looking for.
>It should be simple to index 'what is java' as a single token and to
>search for that same token. However, you will need to create a list of
>accepted 'tokens'. If this is what you need let me know, I will make the
>code available...
>
>cheers,
>Aad Nales
>
>-----Original Message-----
>From: Honey George [mailto:honey_george@yahoo.com] 
>Sent: Tuesday, 14 September, 2004 13:39
>To: Lucene Users List
>Subject: Re: Search PharseQuery
>
>
> --- "Natarajan.T" <na...@crimsonlogic.co.in>
>wrote: 
>  
>
>>Hi All,
>>
>> 
>>
>>How do I implement PharseQuery API?
>>    
>>
>
>What exactly you mean by implement? Are you trying to
>extend the current behavior or only trying find out
>the usage?
>Thanks,
>  George
>
>
>
>	
>	
>		
>___________________________________________________________ALL-NEW
>Yahoo! Messenger - all new features - even more fun!
>http://uk.messenger.yahoo.com
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
>For additional commands, e-mail: lucene-user-help@jakarta.apache.org
>
>  
>


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: Search PharseQuery

Posted by "Natarajan.T" <na...@crimsonlogic.co.in>.
Hi,

Thanks for your response.....

For example search keyword is like below...

Language "what is java"

Token 1:  language
Token 2: what is java(like google)


Regards,
Natarajan.





-----Original Message-----
From: Aad Nales [mailto:aad.nales@rotterdam-cs.com] 
Sent: Tuesday, September 14, 2004 5:19 PM
To: 'Lucene Users List'
Subject: RE: Search PharseQuery

Hi,

Not sure if this is what you need but I created a lastname filter which
in Dutch means potential double last names like:"van der Vaart". In
order to process these I created a finite state machine that queried
these last names. Since I only needed the filter on 'index' time and I
never use it for querieying, this may not be what you are looking for.
It should be simple to index 'what is java' as a single token and to
search for that same token. However, you will need to create a list of
accepted 'tokens'. If this is what you need let me know, I will make the
code available...

cheers,
Aad Nales

-----Original Message-----
From: Honey George [mailto:honey_george@yahoo.com] 
Sent: Tuesday, 14 September, 2004 13:39
To: Lucene Users List
Subject: Re: Search PharseQuery


 --- "Natarajan.T" <na...@crimsonlogic.co.in>
wrote: 
> Hi All,
> 
>  
> 
> How do I implement PharseQuery API?

What exactly you mean by implement? Are you trying to
extend the current behavior or only trying find out
the usage?
Thanks,
  George



	
	
		
___________________________________________________________ALL-NEW
Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: Search PharseQuery

Posted by Aad Nales <aa...@rotterdam-cs.com>.
Hi,

Not sure if this is what you need but I created a lastname filter which
in Dutch means potential double last names like:"van der Vaart". In
order to process these I created a finite state machine that queried
these last names. Since I only needed the filter on 'index' time and I
never use it for querieying, this may not be what you are looking for.
It should be simple to index 'what is java' as a single token and to
search for that same token. However, you will need to create a list of
accepted 'tokens'. If this is what you need let me know, I will make the
code available...

cheers,
Aad Nales

-----Original Message-----
From: Honey George [mailto:honey_george@yahoo.com] 
Sent: Tuesday, 14 September, 2004 13:39
To: Lucene Users List
Subject: Re: Search PharseQuery


 --- "Natarajan.T" <na...@crimsonlogic.co.in>
wrote: 
> Hi All,
> 
>  
> 
> How do I implement PharseQuery API?

What exactly you mean by implement? Are you trying to
extend the current behavior or only trying find out
the usage?
Thanks,
  George



	
	
		
___________________________________________________________ALL-NEW
Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org





---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: Search PharseQuery

Posted by Honey George <ho...@yahoo.com>.
 --- "Natarajan.T" <na...@crimsonlogic.co.in>
wrote: 
> I am trying to extend the current behavior.
You might have already seen a mail from Cocula Remi on
this. Please provide more details of the problem for
specific comments - basically the problem you are
facing and/or what behavior you are trying to extend.
This was not clear from your email. An example will
make things more clear.

Thanks & Regards,
   George




	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


RE: Search PharseQuery

Posted by "Natarajan.T" <na...@crimsonlogic.co.in>.
I am trying to extend the current behavior.

Regards,
Natarajan.

-----Original Message-----
From: Honey George [mailto:honey_george@yahoo.com] 
Sent: Tuesday, September 14, 2004 5:09 PM
To: Lucene Users List
Subject: Re: Search PharseQuery

 --- "Natarajan.T" <na...@crimsonlogic.co.in>
wrote: 
> Hi All,
> 
>  
> 
> How do I implement PharseQuery API? 

What exactly you mean by implement? Are you trying to
extend the current behavior or only trying find out
the usage?
Thanks,
  George



	
	
		
___________________________________________________________ALL-NEW
Yahoo! Messenger - all new features - even more fun!
http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org


Re: Search PharseQuery

Posted by Honey George <ho...@yahoo.com>.
 --- "Natarajan.T" <na...@crimsonlogic.co.in>
wrote: 
> Hi All,
> 
>  
> 
> How do I implement PharseQuery API? 

What exactly you mean by implement? Are you trying to
extend the current behavior or only trying find out
the usage?
Thanks,
  George



	
	
		
___________________________________________________________ALL-NEW Yahoo! Messenger - all new features - even more fun!  http://uk.messenger.yahoo.com

---------------------------------------------------------------------
To unsubscribe, e-mail: lucene-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: lucene-user-help@jakarta.apache.org