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

Query params not pushed to solr #28

Open
illion20 opened this issue Jun 1, 2017 · 0 comments
Open

Query params not pushed to solr #28

illion20 opened this issue Jun 1, 2017 · 0 comments

Comments

@illion20
Copy link

illion20 commented Jun 1, 2017

I have followed the readme and created an external table exactly as described plus loaded my data into solr. I can query my data collection using the browser q=item_name:apple and it returns as expected.

However when I run the same query from hive:

select * from item_solr where item_name = 'apple'

it returns nothing. Is the syntax correct? how do you get hive-solr to tell solr to use q=item_name:apple?

I also tried this query which returns all rows that matches the wildcard:
select * from item_solr WHERE lower(item_name) RLIKE '.*apple.*';

but I can see in the solr logs that hive-solr doesn't succeed in pushing the query params:
2017-08-18 00:33:40.934 INFO (qtp401424608-2599) [ x:item_wild] o.a.s.c.S.Request [item_wild] webapp=/solr path=/select params={q=*:*&distrib=false&cursorMark=AoEvMjA0MjI3LTEwNjI2NTUw&start=0&collection=item_wild&sort=id+asc&rows=1000&wt=javabin&version=2} hits=422407 status=0 QTime=19

I assumed that hive-solr picks up all the predicates in the WHERE clause when query=*:* is specified and puts it in the solr query, am I mistaken?
Similar to this:
https://github.com/vroyer/hive-solr-search

My table definition:
hive> show create table item_solr; OK CREATE EXTERNAL TABLE item_solr( idstring COMMENT 'from deserializer',item_name string COMMENT 'from deserializer') ROW FORMAT SERDE 'com.lucidworks.hadoop.hive.LWSerDe' STORED BY 'com.lucidworks.hadoop.hive.LWStorageHandler' WITH SERDEPROPERTIES ( 'serialization.format'='1') LOCATION 'hdfs://nameservice1/user/solr' TBLPROPERTIES ( 'COLUMN_STATS_ACCURATE'='false', 'lww.jaas.file'='/home/user/jaas-client.conf', 'numFiles'='4', 'numRows'='-1', 'rawDataSize'='-1', 'solr.collection'='item_wild', 'solr.query'='*:*', 'solr.server.url'='http://localhost:11119/solr', 'totalSize'='717879', 'transient_lastDdlTime'='1496303975')

thank you

@illion20 illion20 changed the title No results querying indexed data No results querying indexed data from Hive Jun 1, 2017
@illion20 illion20 changed the title No results querying indexed data from Hive Query params not pushed to solr Aug 18, 2017
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

1 participant