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

Andreas Sewe commented on MINDEXER-108:
---------------------------------------

> What versions of lucene accepts * as prefix? Current master uses Lucene 5.x 
> and it does not accept it...

I am using Lucene 5.4.4 (haven’t changed that from the current master). After 
uncommenting the above {{ParseException}}-throwing in {{indexer-core}} code, it 
happily runs queries like {{(#g:*.maven)}}, which I build like this

{noformat}
queryCreator.constructQuery(MAVEN.GROUP_ID, new 
SearchTypedStringSearchExpression("*.maven", SearchType.EXACT))
{noformat}

and run using {{indexer.searchIterator(...)}}.

That being said, the Maven Indexer still logs the following:

{noformat}
[DEBUG] Executing unbounded search, and fitting topHitCounts to 12537, an OOMEx 
might follow. To avoid OOM use narrower queries or limit your expectancy with 
request.setCount() method where appropriate. See MINDEXER-14 for details.
{noformat}

AFAICT, the {{IteratorSearchResponse}} contains all results, so that warning 
seems inappropriate; MINDEXER-14 has been marked as fixed, after all.)

> Lift restriction on leading wildcard queries
> --------------------------------------------
>
>                 Key: MINDEXER-108
>                 URL: https://issues.apache.org/jira/browse/MINDEXER-108
>             Project: Maven Indexer
>          Issue Type: Improvement
>    Affects Versions: 6.0
>            Reporter: Andreas Sewe
>             Fix For: 6.0
>
>
> The {{DefaultQueryCreator}} prevents queries with leading wildcard:
> {noformat}
> if ( query.startsWith( "*" ) || query.startsWith( "?" ) )
> {
>     throw new ParseException( "Query cannot start with '*' or '?'!" );
> }
> {noformat}
> While this was necessary in older versions of Lucene, the version used now 
> happily executes such queries. The restriction can thus be lifted.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to