How to select distinct field values using Solr?

前端 未结 6 1076
别跟我提以往
别跟我提以往 2020-11-28 04:01

I would like to do the equivalent of this SQL but with Solr as my data store.

SELECT
   DISTINCT txt
FROM
   my_table;

What syntax would fo

6条回答
  •  甜味超标
    2020-11-28 05:00

    I would store the substring in a different field (let's call in txt_substring), then facet on txt_substring as CraftyFella showed.

    Normally I'd use the n-gram tokenizer, but I don't think you can facet on that.

提交回复
热议问题