This topic describes the VMware GemFire Search search command.

Note: VMware GemFire Search uses the Lucene name in syntax and APIs.

The list lucene indexes command searches a VMware GemFire Search index. For details about VMware GemFire Search, see VMware GemFire Search Integration.

Availability: Online.

Syntax

search lucene --name=value --region=value --queryString=value --defaultField=value
    [--limit=value] [--keys-only=value]

Parameters

Name Description Default Value
‑‑name Required. Name of the GemFire Search index to search.
‑‑region Required. Name and path of the region where the GemFire Search index exists.
‑‐queryString Required. Query string to search the index. Use __REGION_VALUE_FIELD as the field name within the query string when the field is a primitive value. Surround a string with double quote marks to do an exact match of the string.
‑‐defaultField Required. Default field to search in. __REGION_VALUE_FIELD identifies the field as a primitive value.
‑‑limit Number of search results needed. If the parameter is not specified: 100
‑‑keys-only Return only keys of search results. If the parameter is not specified: false

Example Command

gfsh> search lucene --name=testIndex --region=/testRegion --queryString=value1
   --defaultField=__REGION_VALUE_FIELD


gfsh> search lucene --name=indexOfStrings --region=/stringTestRegion 
      --queryString='__REGION_VALUE_FIELD:"my exact string"'
      --defaultField=__REGION_VALUE_FIELD

Sample Output

gfsh>search lucene --name=testIndex --region=/testRegion --queryString=value* 
   --defaultField=__REGION_VALUE_FIELD
key | value  | score
--- | ------ | -----
3   | value3 | 1
2   | value2 | 1
1   | value1 | 1
gfsh>search lucene --region=/Person --name=analyzerIndex 
   --defaultField=addr --queryString="97763"
 key   |                         value                                      | score
------ | ------------------------------------------------------------------ | --------
key763 | Person{name='Kris Cat', addr='7 Ash St, Portland_OR_97763', emai.. | 1.669657

Additional gfsh Commands

For additional GemFire Search gfsh commands, see the following:

check-circle-line exclamation-circle-line close-line
Scroll to top icon