lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pasha Bizhan" <lucene-l...@lucenedotnet.com>
Subject RE: "Advanced" query language
Date Sat, 03 Dec 2005 20:18:40 GMT
Hi, 

> From: Erik Hatcher [mailto:erik@ehatchersolutions.com] 

> >    <MoreLikeThis minNumberShouldMatch="3"
> > maxQueryTerms="30">
> 
> We're back to MoreLikeThis - it's not currently a Query subclass.   
> How do you envision this sort of thing fitting in if it's not a Query?

But MoreLikeThis class produces a Query. It's similar to google "define:"
search. 
I think goolge handle such queries and then redirect search to somewhere. 
And QueryParser can handle such searches too and use an alternative logic to
create Query.

For example, we can extend the QueryParser by special (syntax) handlers
which will be create the Query.

Something lke this:
------
	class LikeHandler {};
	LikeHandler likeHandler = new LikeHandler(...);	
	string queryString = "like:(red quick fox)"; 
	Query q = QueryParser.parse(queryString, analyzer, likeHandler);
------

QueryParser scan the input, find special command (like:) and then find the
handler for this command.
If the handler exists the QP call it to create the Query.

Disadvantages are present.

Pasha Bizhan



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


Mime
View raw message