php - Solr: Check if a document exists without retrieving the document -
i need find out if document exists documents saved in solr server pretty big if classic search retrieve document specified id , document returned takes time process. there possibility return example number of matching documents without retrieving actual documents ?
yes, possible. can set rows=0 when submitting query, execute it. no actual documents returned.
in response, can read numfound attribute response. if numfound=1 (since id), document found.
Comments
Post a Comment