Skip to content

Command Line Client

Payam Meyer edited this page Apr 25, 2018 · 8 revisions

zulia.properties

{
	"cluster":true,
	"serverAddress": "localhost",
	"servicePort": 32191,
	"restPort": 32192,
	"dataPath": "/data/zulia/",
	"clusterName": "zulia",
	"mongoServers": [
		{ "hostname": "localhost" }
	]
}

Add Node

bash zuliad --config config/zulia.properties addNode

Remove Node

bash zuliad --config config/zulia.properties removeNode

Start Zulia

bash zuliad --config config/zulia.properties start

Get Indexes

bash zulia getIndexes

Get Current Cluster Nodes

bash zulia --index indexName getCurrentNodes

Get Index Document Count

bash zulia --index indexName getCount

Get Fields Used By an Index

bash zulia --index indexName getFields

Clear Index

bash zulia --index indexName clear

Delete Index

bash zulia --index indexName delete

Optimize Index (only recommended for content that is not frequently updated)

bash zulia --index indexName optimize

Search

Basic Search

bash zulia --index indexName --q "title:water" --rows 10

All Available options

query      Queries the given index in --index argument.
      Usage: query [options]
        Options:
          --facetCount
            Number of facets to return.
            Default: 10
          --facetShardCount
            Number of facets to return per shard.
            Default: 40
          --facets
            List of fields to facet on.
          --fetch
            Fetch type (none, metadata, full)
            Default: none
          --fl
            List of fields to return
          --flMask
            List of fields to mask
          --fq
            Filter query.
          --indexes
            Indexes to query, none to default to the required argument or 
            many. 
          --minimumNumberShouldMatch
            Minimum number of optional boolean queries to match
          --q
            Zulia query, matches all docs by default.
          --qf
            Specific field(s) to search, index default if none given.
          --rows
            Number of records to return.
            Default: 0
          --sort
            List of fields to sort on.
          --sortDesc
            List of fields to sort on in descending order.
          --start
            Results start index.
            Default: 0
Clone this wiki locally