Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Plugin 400 "Bad Request" #18

Open
msplash9 opened this issue Dec 15, 2011 · 4 comments
Open

Plugin 400 "Bad Request" #18

msplash9 opened this issue Dec 15, 2011 · 4 comments

Comments

@msplash9
Copy link

I am trying to use spree solr search plugin .Installation part worked
fine

But when i execute rake solr:reindex BATCH=500

Clearing index for Product...
rake aborted!
400 "Bad Request"

Tasks: TOP => solr:reindex

Can u please check that .

This is my log file

SEVERE: org.apache.solr.common.SolrException: org.apache.lucene.queryParser.ParseException: Cannot parse '{:rows=>25000, :start=>0, :operator=>nil, :facets=>{:limit=>-1, :mincount=>1, :fields=>["price_range_facet", "taxon_names_facet", "brand_property_facet", "color_option_facet", "size_option_facet"]}, :filter_queries=>[], :field_list=>["pk_s", "score"], :query=>"(sadasd AND is_active_t:(true)) AND (type_s:Product)"}': Encountered " <RANGEEX_GOOP> ":operator=>nil, "" at line 1, column 26.
Was expecting:
"}" ...

    at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:108)
    at org.apache.solr.handler.component.SearchHandler.handleRequestBody(SearchHandler.java:174)
    at org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:131)
    at org.apache.solr.core.SolrCore.execute(SolrCore.java:1316)
    at org.apache.solr.servlet.SolrDispatchFilter.execute(SolrDispatchFilter.java:338)
    at org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:241)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
    at java.lang.Thread.run(Thread.java:679)

Caused by: org.apache.lucene.queryParser.ParseException: Cannot parse '{:rows=>25000, :start=>0, :operator=>nil, :facets=>{:limit=>-1, :mincount=>1, :fields=>["price_range_facet", "taxon_names_facet", "brand_property_facet", "color_option_facet", "size_option_facet"]}, :filter_queries=>[], :field_list=>["pk_s", "score"], :query=>"(sadasd AND is_active_t:(true)) AND (type_s:Product)"}': Encountered " <RANGEEX_GOOP> ":operator=>nil, "" at line 1, column 26.
Was expecting:
"}" ...

    at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:205)
    at org.apache.solr.search.LuceneQParser.parse(LuceneQParserPlugin.java:78)
    at org.apache.solr.search.QParser.getQuery(QParser.java:131)
    at org.apache.solr.handler.component.QueryComponent.prepare(QueryComponent.java:89)
    ... 17 more

Caused by: org.apache.lucene.queryParser.ParseException: Encountered " <RANGEEX_GOOP> ":operator=>nil, "" at line 1, column 26.
Was expecting:
"}" ...

    at org.apache.lucene.queryParser.QueryParser.generateParseException(QueryParser.java:1846)
    at org.apache.lucene.queryParser.QueryParser.jj_consume_token(QueryParser.java:1728)
    at org.apache.lucene.queryParser.QueryParser.Term(QueryParser.java:1538)
    at org.apache.lucene.queryParser.QueryParser.Clause(QueryParser.java:1337)
    at org.apache.lucene.queryParser.QueryParser.Query(QueryParser.java:1265)
    at org.apache.lucene.queryParser.QueryParser.TopLevelQuery(QueryParser.java:1254)
    at org.apache.lucene.queryParser.QueryParser.parse(QueryParser.java:200)
    ... 20 more

15 Dec, 2011 5:02:50 PM org.apache.solr.core.SolrCore execute
INFO: [core0] webapp=/solr path=/select/ params={indent=on&start=0&q={:rows%3D>25000,+:start%3D>0,+:operator%3D>nil,+:facets%3D>{:limit%3D>-1,+:mincount%3D>1,+:fields%3D>["price_range_facet",+"taxon_names_facet",+"brand_property_facet",+"color_option_facet",+"size_option_facet"]},+:filter_queries%3D>[],+:field_list%3D>["pk_s",+"score"],+:query%3D>"(sadasd+AND+is_active_t:(true))+AND+(type_s:Product)"}&rows=10&version=2.2} status=400 QTime=34
root@ispconfig:/var/www/giftonomics.empressem.in/s6/sp6#

@msplash9
Copy link
Author

Please check the parse error

@romul
Copy link
Owner

romul commented Dec 15, 2011

This part of your log file shows queries not related to reindex process. Try run rake task with --trace option
.

@msplash9
Copy link
Author

But whenever i am trying to execute this command

rake solr:reindex BATCH=500

I am getting following error

Clearing index for Product...
rake aborted!
400 "Bad Request"

Tasks: TOP => solr:reindex

@maokomioko
Copy link

Did someone managed to get some progress on this issue? I have err 400 as well..

bundle exec rake solr:reindex BATCH=500
[Spree Social] Loading Facebook as authentication source
Clearing index for Spree::Product...
Rebuilding index for Spree::Product...
rake aborted!
400 "Bad Request"
/home/maoko/.rvm/gems/ruby-1.9.3-p327/bundler/gems/acts_as_solr_reloaded-a992d3d7a9c8/lib/solr/connection.rb:166:in post' /home/maoko/.rvm/gems/ruby-1.9.3-p327/bundler/gems/acts_as_solr_reloaded-a992d3d7a9c8/lib/solr/connection.rb:151:insend'
/home/maoko/.rvm/gems/ruby-1.9.3-p327/bundler/gems/acts_as_solr_reloaded-a992d3d7a9c8/lib/acts_as_solr/post.rb:25:in execute' /home/maoko/.rvm/gems/ruby-1.9.3-p327/bundler/gems/acts_as_solr_reloaded-a992d3d7a9c8/lib/acts_as_solr/common_methods.rb:45:insolr_add'
/home/maoko/.rvm/gems/ruby-1.9.3-p327/bundler/gems/acts_as_solr_reloaded-a992d3d7a9c8/lib/acts_as_solr/class_methods.rb:241:in `block (2 levels) in rebuild_solr_index'
Tasks: TOP => solr:reindex

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants