bq: By the way is there any way to see if there is a index for some particular field of a document?
not really conveniently. To know that you have to unwind the inverted index. The "luke" program can do this. Of course if the field is _stored_ it's easy, just return q=id:doc_id&fl=* Also note that in 6x, the above will work for returning the value form a docValues field even if the field isn't stored, https://cwiki.apache.org/confluence/display/solr/DocValues. Lots of background here: https://issues.apache.org/jira/browse/SOLR-8220. Best, Erick On Tue, Jan 24, 2017 at 5:19 PM, Stanislav Sandalnikov <s.sandalni...@gmail.com> wrote: > Thanks Mikhail, didn’t know about debugQuery and explainOther, could be > useful. > > Regarding $q, you can find this information here - > https://cwiki.apache.org/confluence/display/solr/Function+Queries#FunctionQueries-AvailableFunctions > > <https://cwiki.apache.org/confluence/display/solr/Function+Queries#FunctionQueries-AvailableFunctions> > scroll down to «query» function > > Stanislav > >> 25 янв. 2017 г., в 0:56, Mikhail Khludnev <gge...@gmail.com> написал(а): >> >> Hello Stanislav, >> Stored fields have nothing which findability, I believe. Usually debugQuery >> and explainOther is a right way to get what's going on there. What is $q ? >> How it's supposed to work? >> >> 24 янв. 2017 г. 18:29 пользователь "Stanislav Sandalnikov" < >> s.sandalni...@gmail.com> написал: >> >>> Hi everyone, >>> >>> I’m facing strange Solr behavior, which could be better described in >>> examples: >>> >>> >>> With indexed but not stored IndexDate field: >>> >>> 1) With this query everything works fine, I’m getting the results back: >>> /select?fl=taskid,docid,score&q=*:*&fq=((((category:" >>> Security")))+AND+(datasource:(sites)))&fq={!frange+l%3D0} >>> query($q)&sort=IndexDate+desc&rows=100&start=0 >>> >>> 2) With this query I get nothing: >>> /select?fl=taskid,docid,score&q=*:*&fq=((((category:" >>> Security")))+AND+(datasource:(sites))+AND+(IndexDate:[NOW/ >>> DAY-27DAYS+TO+NOW/DAY%2B1DAY]))&fq={!frange+l%3D0}query($q)& >>> sort=IndexDate+desc&rows=100&start=0 >>> >>> Document’s IndexDate fit specified timeframe for sure. >>> >>> 3) With this query there is no category filter, but there is timeframe >>> filter and everything works fine: >>> /select?fl=taskid,docid,score&q=*:*&fq=((datasource:(sites)) >>> +AND+(IndexDate:[NOW/DAY-27DAYS+TO+NOW/DAY%2B1DAY]))& >>> fq={!frange+l%3D0}query($q)&sort=IndexDate+desc&rows=100&start=0 >>> >>> Then I decided that it might be related to IndexDate as it is not stored. >>> I reindexed data with stored IndexDate field and now query number 2 works >>> just fine. >>> >>> However, I don’t get the logic here, why it doesn’t work in some >>> particular case? Can someone explain? >>> >>> Thank you in advance >>> >>> P.S. category field is indexed but not stored in all cases. >>> >>> Regards >>> Stanislav >>> >>> >>> >>> >>> >