0

i am solr newbie, and i am trying to use it for setup a faceted search from a database denormalized view (a table with a lot's of fields).

At the moment i have created the index in solr and i can query the database via solr url. I will use the solr facets to generate the search menu: a set of given fields with all possible values and with the number of occurences for each value

Now the question is, should I use solr to create the fecets and use plain old SQL to query the database or it is better to use solr also to query the database?

Gurwinder Singh
  • 38,557
  • 6
  • 51
  • 76
ugomaria
  • 185
  • 1
  • 2
  • 8

2 Answers2

0

I use the facets to create a search refinement, if you want to suggest to you what to look for you should search for terms. [https://cwiki.apache.org/confluence/display/solr/The+Terms+Component][1]

iLucas97
  • 15
  • 1
  • 5
0

It is always better to query the solr for your search results because if you query the database the number of results can be different compared to what you are showing against that facet , as the results in database my not be yet updated in solr. Another reason is performance , querying different fields spread across multiple tables is expensive compared to all the denormalized documents indexed in a search engine.

Ankush Tanwar
  • 239
  • 2
  • 4