lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Luis Alves (JIRA)" <j...@apache.org>
Subject [jira] Issue Comment Edited: (LUCENE-1782) Rename OriginalQueryParserHelper
Date Thu, 06 Aug 2009 01:27:14 GMT

    [ https://issues.apache.org/jira/browse/LUCENE-1782?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12739844#action_12739844
] 

Luis Alves edited comment on LUCENE-1782 at 8/5/09 6:26 PM:
------------------------------------------------------------

Hi,

I'm adding another example to try to describe the point of having unique names,
to make it easier for future usage.

Below is another (seudo java) example.
The example uses 2 diferent SyntaxParser implementations, 
but only one ProcessorPipeline and one QueryTreeBuilder implementation
to create a single lucene Query.

{code}
String uiquery = "a AND b";

SyntaxParser ssp = new StandartSyntaxParser()
QueryNode tree = ssp.parse(uiquery);

SyntaxParser xmlsp = new XMLSyntaxParser();
QueryNode filter = xmlsp.parse("<query><name='area' code='408'/></query>");

QueryNode bqn = new AndQueryNode();
bqn.add(ssp);
bqn.add(filter);

QueryNodeProcessor spp = new StandartProcessorPipeline(config);

QueryNode optimizedTree = spp.process(bqn);

Query q = builder.build(optimizedTree);
{code}

      was (Author: lafa):
    Hi,

I'm adding another example to try to describe the point of having unique names,
to make it easier for future usage.

Below is another (seudo java) example.
The example uses 2 diferent SyntaxParser implementations, 
but only one ProcessorPipeline and one QueryTreeBuilder implementation
to create a single lucene Query.

{code}
String uiquery = "a AND b";

SyntaxParser ssp = new StandartSyntaxParser()
QueryNode tree = ssp.parse(uiquery);

QueryNode filter = new XMLSyntaxParser("<name='area' code='408'>");

QueryNode bqn = new AndQueryNode();
bqn.add(ssp);
bqn.add(filter);

QueryNodeProcessor spp = new StandartProcessorPipeline(config);

QueryNode optimizedTree = spp.process(bqn);

Query q = builder.build(optimizedTree);
{code}
  
> Rename OriginalQueryParserHelper
> --------------------------------
>
>                 Key: LUCENE-1782
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1782
>             Project: Lucene - Java
>          Issue Type: Improvement
>          Components: contrib/*
>    Affects Versions: 2.9
>            Reporter: Michael McCandless
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 2.9
>
>         Attachments: LUCENE-1782.patch
>
>
> We should rename the new QueryParser so it's clearer that it's
> Lucene's default QueryParser, going forward, and not just a temporary
> "bridge" to a future new QueryParser.
> How about we rename oal.queryParser.original -->
> oal.queryParser.standard (can't use "default": it's a Java keyword)?
> Then, leave the OriginalQueryParserHelper under that package, but
> simply rename it to QueryParser?
> This way if we create other sub-packages in the future, eg
> ComplexPhraseQueryParser, they too can have a QueryParser class under
> them, to make it clear that's the "top" class you use to parse
> queries.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
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