lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Collins <danwcoll...@gmail.com>
Subject How to truncate a particular field, LimitTokenCountAnalyzer or LimitTokenCountFilter?
Date Wed, 26 Jun 2013 07:38:04 GMT
We have a requirement to grab the first N words in a particular field and
weight them differently for scoring purposes.  So I thought to use a
<copyField> and have some extra filter on the destination to truncate it
down (post tokenization).

Did a quick search and found both a LimitTokenCountAnalyzer
and LimitTokenCountFilter mentioned, if I read the wiki right, the Filter
is the correct approach for Solr as we have the schema-able analyzer chain,
so we don't need to code anything, right?

The Analyzer version would be more useful if we were explicitly coding up a
set of operations in Java, so that's what Lucene users directly would tend
to use.

Just in search of confirmation really.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message