Hi,

I created the following fieldType in schema.xml

<fieldType name="text_char_filter" class="solr.TextField"
positionIncrementGap="100">
   <analyzer>
      <charFilter class="solr.MappingCharFilterFactory" mapping="mapping.txt"/>
      <tokenizer class="solr.StandardTokenizerFactory"/>
      <filter class="solr.LowerCaseFilterFactory"/>
   </analyzer>
</fieldType>


mapping.txt contains the following  (replacing dot with white space)

"." => " "

and using the above in the field

<field name="text"      type="text_char_filter" indexed="true"
required="true" stored="false" />


1. in the analysis page on the solr UI
(http://localhost:8984/solr/#/tenant1-core-1/analysis)

     i entered the following in  query tab --host1-dev*

     i got the following output host1, dev

2. I inserted a document where 'text' contains the value host1-dev.eng.abc.com

3. When i go to the query page,
(http://localhost:8984/solr/#/tenant1-core-1/query)

   and using this one for the query text:host1-dev* ( and enabled debug)

   am not getting the row i inserted in above step.

   also, noticed the  "parsedquery_toString":"text:host1-dev*",

      It should have been text:host and text:dev*


can you please guide on how can i make the query work.


Query output (with debug enabled)

{
  "responseHeader":{
    "status":0,
    "QTime":1,
    "params":{
      "q":"text:host1-dev*",
      "indent":"on",
      "wt":"json",
      "debugQuery":"on",
      "_":"1502149448777"}},
  "response":{"numFound":0,"start":0,"docs":[]
  },
  "debug":{
    "rawquerystring":"text:host1-dev*",
    "querystring":"text:host1-dev*",
    "parsedquery":"text:host1-dev*",
    "parsedquery_toString":"text:host1-dev*",
    "explain":{},
    "QParser":"LuceneQParser",
    "timing":{
      "time":1.0,
      "prepare":{
        "time":0.0,
        "query":{
          "time":0.0},
        "facet":{
          "time":0.0},
        "facet_module":{
          "time":0.0},
        "mlt":{
          "time":0.0},
        "highlight":{
          "time":0.0},
        "stats":{
          "time":0.0},
        "expand":{
          "time":0.0},
        "terms":{
          "time":0.0},
        "debug":{
          "time":0.0}},
      "process":{
        "time":0.0,
        "query":{
          "time":0.0},
        "facet":{
          "time":0.0},
        "facet_module":{
          "time":0.0},
        "mlt":{
          "time":0.0},
        "highlight":{
          "time":0.0},
        "stats":{
          "time":0.0},
        "expand":{
          "time":0.0},
        "terms":{
          "time":0.0},
        "debug":{
          "time":0.0}}}}}





Thanks,

D.Radhakrishnan

Reply via email to