Hi Gavin,

I think it could be done by writing a custom prefix operator, along the pattern 
of the - (not) operator in the built-in grammar.

If you look at parser output from from this query:

    
________________________________________
From: [email protected] 
[[email protected]] on behalf of Gavin Haydon 
[[email protected]]
Sent: Thursday, February 28, 2013 11:02 AM
To: General List
Subject: [MarkLogic Dev General] Search 'in' clause

Hi

In the search API is there any way for the grammar to allow something like an 
'in' clause with a list of values. The underlying cts queries can be given a 
list of values, so it would be useful if the higher level search grammar could 
pass such a list down.

For instance, given a defined constraint called  'subject' you could do 
something like:
subject IN (foo, bar)
Where the comma is a configured separator.

Instead of:
subject:foo OR subject:bar

Given a long list of values, would this not be more optimal than a sequence or 
OR terms?

Regards
Gavin Haydon
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general
_______________________________________________
General mailing list
[email protected]
http://developer.marklogic.com/mailman/listinfo/general

Reply via email to