You can write an Update Request Processor that would count the words in the source value for a specified field and generate that count as an integer value for another field.
My old Solr 4.x Deep Dive book has an example that uses a sequence (chain) of existing update processors to count words in a multi-valued text field. That's not as efficient as a custom or script update processor, but avoids creating a custom processor. See: http://www.lulu.com/us/en/shop/jack-krupansky/solr-4x-deep-dive-early-access-release-7/ebook/product-21203548.html Look for "regex-count-words". -- Jack Krupansky On Mon, Mar 21, 2016 at 12:15 PM, G, Rajesh <r...@cebglobal.com> wrote: > Hi, > > When indexing sentences I want to store the number of words in the > sentence in a fields that I can use to with other query later for word > count match. Please let me know whether it is possible? > > Thanks > Rajesh > > > > Corporate Executive Board India Private Limited. Registration No: > U741040HR2004PTC035324. Registered office: 6th Floor, Tower B, DLF Building > No.10 DLF Cyber City, Gurgaon, Haryana-122002, India.. > > > > This e-mail and/or its attachments are intended only for the use of the > addressee(s) and may contain confidential and legally privileged > information belonging to CEB and/or its subsidiaries, including CEB > subsidiaries that offer SHL Talent Measurement products and services. If > you have received this e-mail in error, please notify the sender and > immediately, destroy all copies of this email and its attachments. The > publication, copying, in whole or in part, or use or dissemination in any > other way of this e-mail and attachments by anyone other than the intended > person(s) is prohibited. > > >