Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Lucene: Java-Dev

[jira] Updated: (LUCENE-2064) Highlighter should support all MultiTermQuery subclasses without casts

 

 

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded


jira at apache

Nov 13, 2009, 4:05 PM

Post #1 of 3 (186 views)
Permalink
[jira] Updated: (LUCENE-2064) Highlighter should support all MultiTermQuery subclasses without casts

[ https://issues.apache.org/jira/browse/LUCENE-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2064:
----------------------------------

Summary: Highlighter should support all MultiTermQuery subclasses without casts (was: Highlighter should support all MultiFieldQuery subclasses without casts)

Maybe we should add this patch for 3.0 to not break anything after upgrading to 3.0. As it is completely internal in Highlighter, it would not break anything. Requiring a method in 3.0, whcih should be 2.9 compatible and no new functionality would be not good.

In 3.1 we could add a Fieldable interface that defines getField and eerybody (could) implement it. If not, we could still use this fallback.

> Highlighter should support all MultiTermQuery subclasses without casts
> ----------------------------------------------------------------------
>
> Key: LUCENE-2064
> URL: https://issues.apache.org/jira/browse/LUCENE-2064
> Project: Lucene - Java
> Issue Type: Improvement
> Components: contrib/highlighter
> Affects Versions: 2.9.1
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Fix For: 3.0
>
> Attachments: LUCENE-2064.txt
>
>
> In order to support MultiTermQuery subclasses the Highlighter component applies instanceof checks for concrete classes from the lucene core. This prevents classes like RegexQuery in contrib from being supported. Introducing dependencies on other contribs is not feasible just for being supported by the highlighter.
> While the instanceof checks and subsequent casts might hopefully go somehow away in the future but for supporting more multterm queries I have a alternative approach using a fake IndexReader that uses a RewriteMethod to force the MTQ to pass the field name to the given reader without doing any real work. It is easier to explain once you see the patch - I will upload shortly.

--
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 [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene


jira at apache

Nov 13, 2009, 4:57 PM

Post #2 of 3 (170 views)
Permalink
[jira] Updated: (LUCENE-2064) Highlighter should support all MultiTermQuery subclasses without casts [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2064:
----------------------------------

Attachment: LUCENE-2064.patch

Here the solution with empty MemoryIndex. This seems to be the quickest solution.

> Highlighter should support all MultiTermQuery subclasses without casts
> ----------------------------------------------------------------------
>
> Key: LUCENE-2064
> URL: https://issues.apache.org/jira/browse/LUCENE-2064
> Project: Lucene - Java
> Issue Type: Improvement
> Components: contrib/highlighter
> Affects Versions: 2.9.1
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Fix For: 3.0
>
> Attachments: LUCENE-2064.patch, LUCENE-2064.txt
>
>
> In order to support MultiTermQuery subclasses the Highlighter component applies instanceof checks for concrete classes from the lucene core. This prevents classes like RegexQuery in contrib from being supported. Introducing dependencies on other contribs is not feasible just for being supported by the highlighter.
> While the instanceof checks and subsequent casts might hopefully go somehow away in the future but for supporting more multterm queries I have a alternative approach using a fake IndexReader that uses a RewriteMethod to force the MTQ to pass the field name to the given reader without doing any real work. It is easier to explain once you see the patch - I will upload shortly.

--
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 [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene


jira at apache

Nov 14, 2009, 1:43 AM

Post #3 of 3 (161 views)
Permalink
[jira] Updated: (LUCENE-2064) Highlighter should support all MultiTermQuery subclasses without casts [In reply to]

[ https://issues.apache.org/jira/browse/LUCENE-2064?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Uwe Schindler updated LUCENE-2064:
----------------------------------

Attachment: LUCENE-2064.patch

More simple, as MemoryIndex also provides the empty TermEnum.

> Highlighter should support all MultiTermQuery subclasses without casts
> ----------------------------------------------------------------------
>
> Key: LUCENE-2064
> URL: https://issues.apache.org/jira/browse/LUCENE-2064
> Project: Lucene - Java
> Issue Type: Improvement
> Components: contrib/highlighter
> Affects Versions: 2.9.1
> Reporter: Simon Willnauer
> Assignee: Simon Willnauer
> Fix For: 3.0
>
> Attachments: LUCENE-2064.patch, LUCENE-2064.patch, LUCENE-2064.txt
>
>
> In order to support MultiTermQuery subclasses the Highlighter component applies instanceof checks for concrete classes from the lucene core. This prevents classes like RegexQuery in contrib from being supported. Introducing dependencies on other contribs is not feasible just for being supported by the highlighter.
> While the instanceof checks and subsequent casts might hopefully go somehow away in the future but for supporting more multterm queries I have a alternative approach using a fake IndexReader that uses a RewriteMethod to force the MTQ to pass the field name to the given reader without doing any real work. It is easier to explain once you see the patch - I will upload shortly.

--
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 [at] lucene
For additional commands, e-mail: java-dev-help [at] lucene

Lucene java-dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.