You are viewing limited content. For full access, please sign in.

Question

Question

Search syntax for multiple entry IDs

asked on January 26, 2015

I might be missing something here, but shouldn't I be able to search for multiple entry IDs using something like {LF:ID in(1,2,...)}.

 

Currently, I receive a syntax error with my query.  To return multiple results I have to use {LF:ID = 1} | {LF:ID = 2}...

 

This doesn't seem right.

0 0

Answer

APPROVED ANSWER
replied on January 26, 2015

The X in (1,2,3) type of searches is only available for fields, and would be used like so:

{[]:[MyField](all) in (1,2,3)}

or

{[]:[MyField](any) in (1,2,3)}

The "all"/"any" only matters for multivalued fields: if there are multiple values in the field, "all" requires that all field values be present in the list and "any" requires that one or more of the values are present in the list.

Fred, the syntax you described {LF:ID = 1} | {LF:ID = 2} is the correct way to search for multiple entry IDs. However, depending on your needs, you might be able to use wildcards to achieve the search with a single term.

If you are searching for a range such as 12340 to 12359, you could use bracket wildcards:

{LF:ID="123[4-5][0-9]"}

 

3 0

Replies

replied on January 26, 2015

I was just about to ask the same question (but, instead of entry ids, I have a list of multiple account numbers that I want to run against a given metadata field value).  Thanks!

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.