lucidworks / banana

Banana for Solr - A Port of Kibana
Other
668 stars 235 forks source link

banana 1.5 - Dynamic Field Updates? #104

Open dougmcclure opened 9 years ago

dougmcclure commented 9 years ago

Shouldn't I see the list of fields dynamically update based on a given search result or filtering action? Using Chrome if that matters.

aadel commented 9 years ago

you mean list of fields in Table / FTS panels?

dougmcclure commented 9 years ago

Yes, the fields on the left side of the Table panel.

On Mon, Jan 19, 2015 at 5:05 AM, Ahmed Adel notifications@github.com wrote:

you mean list of fields in Table / FTS panels?

— Reply to this email directly or view it on GitHub https://github.com/LucidWorks/banana/issues/104#issuecomment-70470117.

aadel commented 9 years ago

Currently, fields shown on the left of Table panel are the ones selected in panel settings regardless of what fields are returned in search results.

I think the cost of detecting which fields are returned, either by iterating over query results or adding faceting to table panel query, might outweigh the usability gain, but it seems nice feature to have anyway!

dougmcclure commented 9 years ago

As I read the config.js file, this feature leads me to believe that after any query, the relevant fields available in the paginated result set will be updated.

/* * The default settings will use /admin/luke API to retrieve all fields from Solr including * dynamic fields (e.g. _s, *_t, and etc).

 * You can disable the /admin APIs by setting USE_ADMIN_LUKE and USE_ADMIN_CORES flags to false.
 * The effects are that the field list in Table panel will not be able to show the dynamic fields,
 * and the drop-down collection picker will not work.
 *
 * If USE_ADMIN_LUKE is set to false, Banana will use /schema/fields API instead and dynamic fields
 * will not show up in the field list.
 *
 * If USE_ADMIN_CORES is set to false, Banana will not be able to retrieve the list of Solr collections.
 * And also, the dashboard alert about no collections returned from Solr will be disabled.
 * @type {Boolean}

Can someone explain how the LukeRequestHandler is supposed to work to update fields dynamically?

I get varying results here - sometimes no fields at all, sometimes a portion of all fields, and then no updates based on current search set.

What should be coming back in the query to the luke api?

I'm using Solr 4.7.1 with a collection alias.

dougmcclure commented 9 years ago

Any thoughts or updates for this issue?

dougmcclure commented 9 years ago

My theory is that the API calls made by this request:

https://10.0.0.1:8983/solr/CollectionAlias/admin/luke?numTerms=0&wt=json

Isn't getting what is needed from the CollectionAlias. The actual CollectionAlias may have many collections, and it appears that the only data coming back is for the first collection in the CollectionAlias list.

What can be done here to ensure that this call gets back all collection information, finds all fields associated with those collections and updates the table's field list dynamically based on what's been searched or filtered?

Tks!

athana commented 9 years ago

@dougmcclure I also experienced the same issues in the field list of Table panel, especially when there are too many fields (like 100+) in the data, or sometimes when there are a lot of dynamic fields. The Solr API /admin/luke is what I used to retrieve the field list and it works in most cases.

So I fixed this issue (in commit https://github.com/LucidWorks/banana/commit/7c8a4c45120b08bed1d4beaa444161858355d9ef) by editing the Table panel’s code. Now the field list in Table panel will dynamically display only non-empty fields. As fields in your data changes, the field list will also change as well. You can try it out by downloading the latest code from ‘develop” branch.