Hi,
I have a requirement to display all (distinct) terms from one or more
fields, alphabetically sorted with pagination (because all terms need to
be displayed, not only most popular ones) for something like simple auto
suggest/dictionary.
I've checked API (before) and I think Terms API was ideal for this. Now,
with Terms API removed I don't know if or how can I achieve some
functionality (especially 'prefix', 'pagination' and 'sort = term') with
facets.
I understand executing a faceted search with 0 result size, like here:
Hi,
I have a requirement to display all (distinct) terms from one or more
fields, alphabetically sorted with pagination (because all terms need to
be displayed, not only most popular ones) for something like simple auto
suggest/dictionary.
I've checked API (before) and I think Terms API was ideal for this. Now,
with Terms API removed I don't know if or how can I achieve some
functionality (especially 'prefix', 'pagination' and 'sort = term') with
facets.
I understand executing a faceted search with 0 result size, like here:
Hi,
I have a requirement to display all (distinct) terms from one or more
fields, alphabetically sorted with pagination (because all terms need to
be displayed, not only most popular ones) for something like simple auto
suggest/dictionary.
I've checked API (before) and I think Terms API was ideal for this. Now,
with Terms API removed I don't know if or how can I achieve some
functionality (especially 'prefix', 'pagination' and 'sort = term') with
facets.
I understand executing a faceted search with 0 result size, like here:
I have been enhancing the terms facet in master (0.9.1). For example, you
can now sort by terms and not just count. And you can use a regex to control
the what terms gets included.
On Sun, 2010-08-08 at 17:05 +0200, Clinton Gormley wrote:
will give me terms from field 'text', but how can I get all terms (not
only "size"), alphabetically sorted and with pagination (without Terms
API)?
I don't think you can, any more.
You would have to use a very large 'size', then sort them alphabetically
in your client.
This seems an unusual use case though. Why do you need to display
(potentially) millions of terms?
Surely the user really just wants a list of (eg) 10, which are the most
frequently used?
I understand your point of view when considering faceting, but this
requirement is more in direction of simple auto suggest/dictionary (with
terms from index), where you need to display all terms not only most
popular ones (and restrict/narrow results by prefix).
Like from Terms API definition: 'This can be very handy to implement
things like tag clouds or simple auto suggest.'
(tag clouds can be implemented by facets as they are)
I didn't get results (terms) alphabetically sorted in response (they
were sorted by count). Did I maybe misplaced/misused 'sort' param in
query request?
Tomislav
On Sun, 2010-08-08 at 23:00 +0300, Shay Banon wrote:
I have been enhancing the terms facet in master (0.9.1). For example,
you can now sort by terms and not just count. And you can use a regex
to control the what terms gets included.
> will give me terms from field 'text', but how can I get all
terms (not
> only "size"), alphabetically sorted and with pagination
(without Terms
> API)?
I don't think you can, any more.
You would have to use a very large 'size', then sort them
alphabetically
in your client.
This seems an unusual use case though. Why do you need to
display
(potentially) millions of terms?
Surely the user really just wants a list of (eg) 10, which are
the most
frequently used?
clint
I didn't get results (terms) alphabetically sorted in response (they
were sorted by count). Did I maybe misplaced/misused 'sort' param in
query request?
Tomislav
On Sun, 2010-08-08 at 23:00 +0300, Shay Banon wrote:
I have been enhancing the terms facet in master (0.9.1). For example,
you can now sort by terms and not just count. And you can use a regex
to control the what terms gets included.
> will give me terms from field 'text', but how can I get all
terms (not
> only "size"), alphabetically sorted and with pagination
(without Terms
> API)?
I don't think you can, any more.
You would have to use a very large 'size', then sort them
alphabetically
in your client.
This seems an unusual use case though. Why do you need to
display
(potentially) millions of terms?
Surely the user really just wants a list of (eg) 10, which are
the most
frequently used?
clint
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.