lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Emir Arnautović <emir.arnauto...@sematext.com>
Subject Re: Query fields with data of certain length
Date Wed, 03 Jan 2018 13:44:33 GMT
Hi Edwin,
If it is one time thing you can use regex to filter out results that are not long enough.
Something like: subject:/.{255,}.*/.
Of course, this means subject is not tokenized.

It would be probably best if you index subject length as separate field and include it in
query as subject_length:[255 TO *].

HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 1 Jan 2018, at 04:00, Zheng Lin Edwin Yeo <edwinyeozl@gmail.com> wrote:
> 
> Hi,
> 
> Would like to check, if it is possible to query a field which has data of
> more than a certain length?
> 
> Like for example, I want to query the field subject that has more than 255
> bytes. Is it possible?
> 
> I am currently using Solr 6.5.1.
> 
> Regards,
> Edwin


Mime
View raw message