Support Questions

Find answers, ask questions, and share your expertise

Hue 3.11 how to show solr custom query values in hue search dashboard?

New Contributor

Hi Hue Team!
I’m playing around with Solr Search in Hue 3.11 on top of CDH-5.10(parcels).
AFAIK I can’t create new field during indexing so I did a custom Solr query to calculate required values.
I see “query definitions” button in right upper corner in hue search dashboard – can I use it to add my custom Solr’s query? If yes – how?

bigdata_hue_solr_query_button.png
If no – is there a way to make my calculated values available during dashboard’s creation?
The query I use:
select?q=quantity:*&fq=fueling_type:full&fq=trip_odometer:[200+TO+*]&sort=div(quantity,div(trip_odometer,100))+desc&fl=div(quantity,div(trip_odometer,100))&wt=json&indent=true

 

Thanks!

4 REPLIES 4

Champion

@moss4cdh

 

 

Pls watch the video in the below link, it will show you how to use query definition

 

http://gethue.com/dynamic-search-dashboard-improvements-3/

 

 

New Contributor

Thanks Saran,

 

It seems I was wrong: mentioned "query definition" simply saves current dashboard filtering.

 

What I need is a way to inject a new value/field obtained from a custom solr query executed outside hue.

 

I have a database with fueling statistics and there is no existing field with average fuel consumption. I have everything I need to calculate it using provided solr query. Now I try to inject it somehow to hue's search index/dashboard.

 

The question is: does hue support something like this?

There is no custom Solr query in the dashboard.

What would be the purpose? (seems like it would defeat the purpose of the
dashboard)

New Contributor

Hello Romain,

 

Let me clarify a bit more my situation:

I've a database with fuel consumption statistic which I can index without problems using new indexer.

I've tried to add a new field based on simple calculation of two existing fields during the indexing but I didn't find an option to do that. 

So I've created a Solr query (directly in Solr GUI) which calculates required field (fuel consumption):

select?q=quantity:*&fq=fueling_type:full&fq=trip_odometer:[200+TO+*]&sort=div(quantity,div(trip_odometer,100))+desc&fl=div(quantity,div(trip_odometer,100))&wt=json&indent=true

Now I want to be able to use it somehow in hue search dashboard (for fuel consumption graph for example).

Can I visualize something that is not directly in index in hue search dashboard?

 

Thanks!

 

Take a Tour of the Community
Don't have an account?
Your experience may be limited. Sign in to explore more.