bq: Note:Term Component works only on string dataType field. :( Not true. Term Component will work on any indexed field. It'll bring back the _tokens_ that have been indexed though, which are often individual words so your examples "medical physics" would be two separate tokens so it may be puzzling.
A general request, please don't put bold text. I know it's an attempt to help direct attention to the important bits, but (at least in gmail in my browser) bolds are replaced by "*" before and after, which especially when looking at wildcard questions is really confusing <G>. But I have to ask you to back up a bit. _Why_ are you using TermsComponent to search titles? Why not use Solr for what it's good for and just search a _tokenized_ title field? This feels like an XY problem. Best Erick On Thu, Jul 11, 2013 at 2:55 AM, Parul Gupta(Knimbus) <parulgp...@gmail.com> wrote: > Hi All.... > > I am using *Term component* in solr for searching titles with short form > using wild card characters(.*) and [a-z0-9]*. > > I am using *Term Component* specifically as wild card characters are not > working on *select?q=* query search. > > Examples of some *title *are: > > 1)Medicine, Health Care and Philosophy > 2)Medical Physics > 3)Physics of fluids > 4)Medical Engineering and Physics > > ***When i do *solr query*: > localhost:8080/solr3.6/OA/terms?terms.fl=title&terms.regex=phy.* > fluids&terms.regex.flag=case_insensitive&terms.limit=10 > > *Output* is 3rd title: > *Physics of fluids* > > This is relevant output. > > ***But when i do *solr query*: > > localhost:8080/solr3.6/OA/terms?terms.fl=title&terms.regex=med.* > phy.*&terms.regex.flag=case_insensitive&terms.limit=10 > > *Output* are 2nd and 4th title: > > *Medical Engineering and Physics* > *Medical Physics* > > This is irrelevant.I want only one result for this query i.e. *Medical > Physics* > > *********************************Although i have changed my wild card > characters to *[a-z0-9]** instead of *.** ,but than first query doesn't work > as '*of*' is included in '*Physics of fluids*'.However Second query works > fine . > > example of query is: > > localhost:8080/solr3.6/OA/terms?terms.fl=title&terms.regex=med[a-z0-9]* > phy[a-z0-9]*&terms.regex.flag=case_insensitive&terms.limit=10 > > This works fine,gives one output *Medical Physics*. > > > If there is another way for searching using *Term Component* or without > using it..Please suggest to neglect such stop words. > > Note:Term Component works only on string dataType field. :( > > > > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/Problem-using-Term-Component-in-solr-tp4077200.html > Sent from the Solr - User mailing list archive at Nabble.com.