[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-20 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[trunk commit] Steven Rowe
http://svn.apache.org/viewvc?view=revision&revision=1447141

LUCENE-4728: IntelliJ configuration: add queries module dependency to 
highlighter module


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-20 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[branch_4x commit] Steven Rowe
http://svn.apache.org/viewvc?view=revision&revision=1447142

LUCENE-4728: IntelliJ configuration: add queries module dependency to 
highlighter module (merged trunk r1447141)


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-05 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[branch_4x commit] Simon Willnauer
http://svn.apache.org/viewvc?view=revision&revision=1442606

LUCENE-4728: add queries to the classpath since highlighter specializes a query 
now


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-05 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[trunk commit] Simon Willnauer
http://svn.apache.org/viewvc?view=revision&revision=1442605

LUCENE-4728: add queries to the classpath since highlighter specializes a query 
now


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-05 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[branch_4x commit] Simon Willnauer
http://svn.apache.org/viewvc?view=revision&revision=1442599

LUCENE-4728: Unknown and not explicitly mapped queries are now rewritten 
against the highlighting IndexReader to obtain primitive queries before 
discarding the query entirely.


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-05 Thread Commit Tag Bot (JIRA)

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

Commit Tag Bot commented on LUCENE-4728:


[trunk commit] Simon Willnauer
http://svn.apache.org/viewvc?view=revision&revision=1442590

LUCENE-4728: Unknown and not explicitly mapped queries are now rewritten 
against the highlighting IndexReader to obtain primitive queries before 
discarding the query entirely.



> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch, 
> LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-04 Thread Simon Willnauer (JIRA)

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

Simon Willnauer commented on LUCENE-4728:
-

any comments on this?

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Uwe Schindler (JIRA)

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

Uwe Schindler commented on LUCENE-4728:
---

bq. But isnt this easily solvable? we just wrap a ParallelReader around that.

+1 thats the solution!

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4728:
-

{quote}
  private Map readers = new 
HashMap(10); 
{quote}

Well this is the core problem: per-field readers. Currently the only reasons 
multitermqueries rewrite is because 
they know the field.

But isnt this easily solvable? we just wrap a ParallelReader around that.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Uwe Schindler (JIRA)

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

Uwe Schindler commented on LUCENE-4728:
---

Hi,
I had the same problem while implementing a custom query for a customer. The 
query was very easy, it just rewrote after expanding terms to MultiPhraseQuery 
- you would expect that this works with highlighter! - But it doen't. The 
problem is that highligther does not even try to rewrite the query, it only 
checks via instanceof checks the *original* query type, failing to highlight my 
simple query without custom weights and scorers, just a very simple rewrite 
method. That is not a good design! If the highlighter would rewrite the query 
as a last chance this problem would have been solved. The problem with that is 
a second one in the crazy Lucene Highlighter: You need the field name for 
highlighter to work :(

For this customer my only chance was to use Javassist to hot-patch the 
WeightedSpanTermExtractor and add another instanceof check. Overriding the 
fallback to handle other queries was impossible because the customer's 
framework was ElasticSearch which has a highly private, unextendable 
WeightedSpanTermExtractor with no possibility to override the Lucene default :( 
[same applies for Solr]

This brings us back to a very old issue: We should extend the Query class by a 
simple additional API, so it can provide all metadata needed to do highlighting 
without crazy instaceof chains.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Simon Willnauer (JIRA)

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

Simon Willnauer commented on LUCENE-4728:
-

bq. wait i dont get it... its another instanceof block.
no not necessarily. Since for rewrite I need to get the field of the query 
otherwise I can't get a IndexReader in WeightedSpanTermExtractor. The other 
problem here is that WeightedSpanTermExtractor doesn't rewrite against a global 
reader but rather against a "reanalyzed" reader which might bring up problems 
in the case of CommonTermsQuery which will in-turn create a different 
BooleanQuery. 

bq. I dont think highlighters should depend on the concrete queries, only the 
abstract apis (just like i think modules shouldnt depend on analyzers 
modules)... otherwise its a sign something is wrong.

dude this is wishful thinking unless we fix our API to allow to do positional 
queries. Really we already rely on it with ConstantScore / FilteredQuery 
calling getQuery() we also rely on BQ etc. and TermQuery which is not abstract 
api.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4728:
-

wait i dont get it... its another instanceof block.

I think we would just do the same trick in WeightedSpanTermExtractor, and then 
in the test have a mock query that rewrites to primitives (e.g. boolean query) 
and not have highlighter depend on the queries module?

I dont think highlighters should depend on the concrete queries, only the 
abstract apis (just like i think modules shouldnt depend on analyzers 
modules)... otherwise its a sign something is wrong.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Simon Willnauer (JIRA)

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

Simon Willnauer commented on LUCENE-4728:
-

bq. nice: I like it! Is it possible to fix WeightedSpanTermExtractor the same 
way for the other highlighter?
this one is tricky since it involves getting the field from the query in order 
to fetch a reader. This involves instanceof checks again which doesn't buy use 
much. Fix positions on Query / Scorer would help you know :) I think this is 
ready, I will commit that soon.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-02-01 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4728:
-

nice: I like it! Is it possible to fix WeightedSpanTermExtractor the same way 
for the other highlighter?

it seems like the default if it doesnt know the query is... to do nothing?


> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch, LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-01-29 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4728:
-

{quote}
the reason why I didn't do that is that this query simply stops flattening if 
it doesn't know the query so if we turn this around we need to make sure that 
we don't end up in an endless loop rewriting all the time.
{quote}

I don't see the problem, we only need to rewrite it until it 'stops', just like 
indexsearcher does:
{noformat}
Query query = original;
for (Query rewrittenQuery = query.rewrite(reader); rewrittenQuery != query;
 rewrittenQuery = query.rewrite(reader)) {
  query = rewrittenQuery;
}
{noformat}

{quote}
I don't think this is a bottle neck of any sort 
{quote}

I do think its a bottleneck, in that if we only did this simple thing, then 
highlighters wouldnt have to have hard dependencies on every concrete query we 
add. They would also work with custom queries that users make that rewrite to 
graphs of core queries (this one is a perfect example!)

There isn't a need for the highlighting module to depend on the queries module 
when it can do this with the abstract API already in core.

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-01-29 Thread Simon Willnauer (JIRA)

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

Simon Willnauer commented on LUCENE-4728:
-

the reason why I didn't do that is that this query simply stops flattening if 
it doesn't know the query so if we turn this around we need to make sure that 
we don't end up in an endless loop rewriting all the time. I mean we can do 
this and add another check but I would feel safer to have these explicit checks 
to be honest. I don't think this is a bottle neck of any sort so while I don't 
really like it I think its ok though. 

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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



[jira] [Commented] (LUCENE-4728) Allow CommonTermsQuery to be highlighted

2013-01-28 Thread Robert Muir (JIRA)

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

Robert Muir commented on LUCENE-4728:
-

In the case of these highlighters with huge instanceof's across all queries, 
instead of doing things like:

{noformat}
+} else if (sourceQuery instanceof CommonTermsQuery) {
+  flatten(sourceQuery.rewrite(reader), reader, flatQueries);
 }
{noformat}

can't it just be something like:
{noformat}
+} else if (!sourceQuery instanceof MultiTermQuery) {
+  // an unknown query type, see if it rewrites into something we know.
+  flatten(sourceQuery.rewrite(reader), reader, flatQueries);
 }
{noformat}

then we wouldn't need explicit dependencies in these highlighters on *every 
single query*

> Allow CommonTermsQuery to be highlighted
> 
>
> Key: LUCENE-4728
> URL: https://issues.apache.org/jira/browse/LUCENE-4728
> Project: Lucene - Core
>  Issue Type: Improvement
>  Components: modules/highlighter
>Affects Versions: 4.1
>Reporter: Simon Willnauer
>Assignee: Simon Willnauer
> Fix For: 4.2, 5.0
>
> Attachments: LUCENE-4728.patch
>
>
> Add support for CommonTermsQuery to all highlighter impls. 
> This might add a dependency (query-jar) to the highlighter so we might think 
> about adding it to core?

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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