Enabling docValues on a boolean field is probably not a good idea. If disabling that doesn't help (and I do think it will), then you might want to use a simple string field that a doc either has the name of the boolean (if true) or does not, then facet on that.
On Thu, Jan 4, 2024 at 3:18 PM Mikhail Khludnev <m...@apache.org> wrote: > How does it work with facet.method=enum? > Slicing to even smaller shards makes sense. > > On Wed, Jan 3, 2024 at 12:10 AM rajani m <rajinima...@gmail.com> wrote: > > > Hi Solr Users, > > > > Queries with facets show 2x increase in latency. This facet field is a > > boolean field with docvalues enabled[1]. Same queries without facets > have > > ~50 ms and with facets it is ~120ms. Is this an expected performance? > > Appreciate any suggestions to optimize it. > > > > Additional details - I am querying a single shard, > > distrib=false&cache=false, standard query such as > > "&q=cats&defType=edismax&qf=keywords title desc body" have ~50 ms qtime > and > > with facets (facet=true&facet.field=has_color) it is jumping to 120ms. Is > > this expected performance with facets, or are there other factors that > > could be cause result to such increase in the latency? Could this be > > because of shard index size which is 65 gb, is this big? and would > > splitting the shard into a 30gb size improve the performance? Cpu and ram > > should not be a concern, the node hosting shard has enough ram to fit the > > entire shard index and has 16vcpus. What other factors can result in > > increasing latency? Appreciate suggestions to improve the latency. > > > > [1] <fieldType name="boolean" class="solr.BoolField" > sortMissingLast="true" > > omitNorms="true" docValues="true"/> > > > > Thanks, > > Rajani > > > > > -- > Sincerely yours > Mikhail Khludnev >