Thanks. I do not want to search if the query is shorter than a certain number of terms/characters.
For example, I have a 10MB document indexed in Solr what I want is to search query in first 1MB content of that indexed document. Any workaround e.g .can I send query to Solr to look for only 1MB from start of document.? On Fri, Jan 26, 2018 at 10:46 PM, Diego Ceccarelli (BLOOMBERG/ LONDON) < dceccarel...@bloomberg.net> wrote: > Hi Zahid, if you want to allow searching only if the query is shorter than > a certain number of terms / characters, I would do it before calling solr > probably, otherwise you could write a QueryParserPlugin (see [1]) and check > that the query is sound before processing it. > See also: http://coding-art.blogspot.co.uk/2016/05/writing-custom- > solr-query-parser-for.html > > Cheers, > Diego > > [1] https://wiki.apache.org/solr/SolrPlugins > > > From: solr-user@lucene.apache.org At: 01/26/18 13:24:36To: > solr-user@lucene.apache.org > Cc: apa...@elyograg.org > Subject: ***UNCHECKED*** Limit Solr search to number of character/words > (without changing index) > > Hi All, > > Is there any way I can restrict Solr search query to look for specified > number of characters/words (for only searching purposes not for > highlighting) > > *For example:* > > *Indexed content:* > *I am a man of my words I am a lazy man...........* > > Search to consider only below mentioned (words=7 or characters=16) > *I am a man of my words* > > If I search for *lazy *no record should find. > If I search for *a *1 record should find. > > > Thanks > Zahid Iqbal > > >