Skip to content
This repository was archived by the owner on Aug 13, 2026. It is now read-only.
This repository was archived by the owner on Aug 13, 2026. It is now read-only.

yokozuna filterQuery problem [JIRA: CLIENTS-831] #153

Description

@zhaohanweng

When I call

http://localhost:8098/search/query/solr-index?wt=json&q=*:*&fq={!geofilt pt=43.76190533278233,-79.408447073731 sfield=onboardingCoords d=0.01} 

This works.

But If I use the nodejs client, and pass in filterQuery in the search,

riak.search({
    indexName: 'solr-index',
    q: '*:*',
    filterQuery: "{!geofilt pt=43.76190533278233,-79.408447073731 sfield=onboardingCoords d=0.1}"
})

I got the following error.

 <0.23930.3>@yz_pb_search:maybe_process:111 {solr_error,{500,"http://localhost:8093/internal_solr/solr-index/select",<<"{\"error\":{\"msg\":\"The field onboardingCoords does not support spatial filtering\",\"trace\":\"org.apache.solr.common.SolrException: The field onboardingCoords does not support spatial filtering\\n\\tat org.apache.solr.search.SpatialFilterQParser.parse(SpatialFilterQParser.java:84)\\n\\tat org.apache.solr.search.QParser.getQuery(QParser.java:141)\\n\\tat org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:168)\\n\\tat org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:193)\\n\\tat org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:135)\\n\\tat org.apache.solr.core.SolrCore.execute(SolrCore.java:1916)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:780)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:427)\\n\\tat org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:217)\\n\\tat org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1419)\\n\\tat org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:455)\\n\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:137)\\n\\tat org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:557)\\n\\tat org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:231)\\n\\tat org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1075)\\n\\tat org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:384)\\n\\tat org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:193)\\n\\tat org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1009)\\n\\tat org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:135)\\n\\tat org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:255)\\n\\tat org.eclipse.jetty.server.handler.HandlerCollecti...">>}} [{yz_solr,search,3,[{file,"src/yz_solr.erl"},{line,292}]},{yz_pb_search,maybe_process,3,[{file,"src/yz_pb_search.erl"},{line,76}]},{riak_api_pb_server,process_message,4,[{file,"src/riak_api_pb_server.erl"},{line,388}]},{riak_api_pb_server,connected,2,[{file,"src/riak_api_pb_server.erl"},{line,226}]},{riak_api_pb_server,decode_buffer,2,[{file,"src/riak_api_pb_server.erl"},{line,364}]},{gen_fsm,handle_msg,7,[{file,"gen_fsm.erl"},{line,505}]},{proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,239}]}]

Is the filterQuery the same as fq ? If not how can I pass in fq using nodejs client.

Here's my schema:

<schema>
    <fields>
        <field name="onboardingCoords" type="location" indexed="true" stored="true" multiValued="false"/>
        <dynamicField name="*_coordinate"  type="tdouble" indexed="true"  stored="false"/>
    </fields>

        .......

    <types>
        <fieldType name="tdouble" class="solr.TrieDoubleField" precisionStep="8" positionIncrementGap="0"/>

        <!-- A specialized field for geospatial search. If indexed, this fieldType must not be multivalued. -->
        <fieldType name="location" class="solr.LatLonType" subFieldSuffix="_coordinate"/>
    </types>
</schema>

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions