I need to find all the documents in my collection for which the length of a certain field exceeds a certain limit. The field's type is string. Is there a function query that returns the length of a string field in Solr?
相关问题
- JCR-SQL - contains function doesn't escape spe
- Solr Deduplication (dedupe) giving all zeros in si
- Solr (Sunspot), max results more than 30?
- Match lucene entire field exact value
- How to rank documents using tfidf similairty in lu
相关文章
- Solr - _version_ field must exist in schema and be
- SolrNet - Score always 0
- How can use the /export request handler via SolrJ?
- request counting for documents in apache solr
- How to search records between two coordinates usin
- Boost result by specified search term on top
- CakePHP with Lucene
- Faceted searching and categories in MySQL and Solr
The solution is to use Solr's regex capabilities. For example, the following query retrieves all the documents for which the
title
field is at least 42:Querying by length is not supported out of the box, the most sensible way would be to create a separate (numeric) field and query by this field.