Home | About | Sematext search-lucene.com search-hadoop.com
 Search Lucene and all its subprojects:

Switch to Plain View
Lucene, mail # user - surround parser match-all query


+
Mike Sokolov 2012-05-06, 21:26
+
Vladimir Gubarkov 2012-05-06, 22:10
+
Mike Sokolov 2012-05-06, 22:56
+
Robert Muir 2012-05-06, 23:28
Copy link to this message
-
Re: surround parser match-all query
Mike Sokolov 2012-05-07, 00:04
I think what I have in mind would be purely an artifact of the parser; a
term that would always be optimized away, either vanishing or gobbling
up the whole query.  So if you had  n(A,*), you would just get "A".  If
you had and(A, not(*)) (is that the surround syntax for not?) you would
get nothing, if you had * you would get all the documents.  Maybe this
could be done without having to actually generate a query internally,
but could happen during parsing.  It's kind of a weird case, but I am
trying to translate from one query language to another, and it would be
convenient to have this as an option.

-Mike

On 5/6/2012 7:28 PM, Robert Muir wrote:
> Hi Mike: wheres for the normal queryparser this Query doesn't consult
> the positions file and is trivial, how would such a query be
> implemented for the surround parser? As a single span that matches all
> positions for the whole document? Maybe it could be a "fake span" for
> each document of 0 ... Integer.MAX_VALUE?
>
> I think it would be nice to have as long as its not going to be too
> inefficient...
>
> On Sun, May 6, 2012 at 5:26 PM, Mike Sokolov<[EMAIL PROTECTED]>  wrote:
>> does anybody know how to express a MatchAllDocsQuery in surround query
>> parser language?  I've tried
>>
>> *
>>
>> and()
>>
>> but those don't parse.  I looked at the grammar and I don't think there is a
>> way.  Please let us all know if you know otherwise!
>>
>> Thanks
>>
>> -Mike Sokolov
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [EMAIL PROTECTED]
>> For additional commands, e-mail: [EMAIL PROTECTED]
>>
>
>
---------------------------------------------------------------------
+
Mike Sokolov 2012-05-07, 00:22