Shamsheerkhan
Shamsheerkhan

Reputation: 117

What is the difference between "*" and "*:*" in solr

What is the difference between * and * : * in solr 4.0 ?

Upvotes: 2

Views: 173

Answers (2)

Jayendra
Jayendra

Reputation: 52779

The Queries are equivalent to :-

q=* --> default search field:*
Wildcard query would be fired on default search if field specified

q=*:* --> All Fields:*
It would fire wildcard query on that all fields. Usually used to get all results from a Collection.

Upvotes: 1

Parvin Gasimzade
Parvin Gasimzade

Reputation: 26012

* is wildcard character which indicates the zero or more occurrence of the preceding characters. For example if there is an indexed word Stackoverflow, then you can search it using Stackover* which will find the indexed word.

On the other hand, *:* is used with the main query (q) to get all documents from the index (if no other parameters set).

Upvotes: 1

Related Questions