nonono, mate! I warn you before by 'Mind term ecoding due to field type!'

you need to obtain schema from request, then access fieldtype and convert
external string representation into (might be) tricky encoded bytes by
readableToIndexed() see FieldType.getFieldQuery()

btw, it's a really frequent pain in this list, feel free to contribute when
you done!

Empty BooleanQuery matches nothing. There is a  MatchAllDocsQuery().

On Mon, Jun 17, 2013 at 8:35 PM, Igor Kustov <ivkus...@gmail.com> wrote:

>
> Menawhile I'm currently trying to write custom QParser which will use
> FieldCacheTermsFilter
>
> So I'm using query like
> http://127.0.0.1:8080/solr/select?q=*:*&fq={!mqparser}id:%281%202%203%29<http://127.0.0.1:8080/solr/select?q=*:*&fq=%7B!mqparser%7Did:%281%202%203%29>
>
> And I couldn't make it work - I just couldn't find a proper constructor and
> also not sure that i'm filtering appropriately.
>
> private class MyQParser {
>
> List<String> idsList;
>
> MyQParser(String queryString, SolrParams localParams, SolrParams
> solrParams,
> SolrQueryRequestsolrQueryRequest) throws SyntaxError {
>             super(queryString,localParams,solrParams, solrQueryRequest);
>              idsList = // extract ids from params
>         }
>
>         @Override
>         public Query parse() throws SyntaxError {
>                    FieldCacheTerms filter = new
> FieldCacheTermsFilter("id",idsList.toArray())
> // first problem id is just an int in my case, but this seems like the only
> normal constructor
>                    return new FilteredQuery(new BooleanQuery(), filter);
> // my goal here is to get only filtered data, but does BooleanQuery()
> equals
> to *:*?
>         }
>
>
>
>
>
>
>
> --
> View this message in context:
> http://lucene.472066.n3.nabble.com/Solr-large-boolean-filter-tp4070747p4071049.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>



-- 
Sincerely yours
Mikhail Khludnev
Principal Engineer,
Grid Dynamics

<http://www.griddynamics.com>
 <mkhlud...@griddynamics.com>

Reply via email to