lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saman Rasheed <>
Subject without termfeq - returning the number of terms/or regex of terms in a document
Date Mon, 22 May 2017 17:14:31 GMT
i have an english book which i have indexed its contents successfully into field called 'content,
with the following properties:

<field name="content" type="text_general" indexed="true" stored="true" multiValued="true"
termVectors="true" termPositions="true" termOffsets="true"/>

so if need to return the number of a specific term regex e.g. '*olomo*' then my document should
contain 2 and give me 'Solomon' with a term frequency = 2.

I've tried going through the term vector section in the reference and various other posts
on the internet but still i havent managed to figure out how.

the nearest i found is the following syntax/way:


which brings my pc to a near halt for about a couple of minutes, and then it returns the term
frequency of every term! but i only need the term frequency of particular pattern/regex:

is there a way to narrow it down to just one regex term, e.g. *thing*, so it will find soothing,
somthing, everything each with their number of occurences for the document?


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