lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Fenbers <mark.fenb...@noaa.gov>
Subject Re: query parsing
Date Wed, 23 Sep 2015 14:10:11 GMT
Mugeesh, I believe you are on the right path and I was eager to try out 
your suggestion.  So my schema.xml now contains this snippet (changes 
indicated by ~):

<field name="id" type="date" indexed="true" stored="true" 
required="true" />
  ~         <field name="logtext" type="logtype" indexed="true" 
stored="true" required="true" />
<field name="category" type="int" indexed="true" stored="true" 
required="true" />
<field name="username" type="string" indexed="true" stored="true" 
required="true" />
~          <field name="ELall" type="logtype" indexed="true" 
stored="true" multiValued="true" />
<copyField source="logtext" dest="ELall" />
<copyField source="username" dest="ELall" />

~          <fieldType name="logtype" class="solr.TextField">
~     <analyzer type="index">
~        <tokenizer class="solr.StandardTokenizerFactory" />
~        <filter class="solr.StandardFilterFactory" />
~   </analyzer>
~ </fieldType>

but my results are the same -- that my search yields 0 results unless I 
wrap the search word with asterisks.

Alessandro, below are the results (with and without the asterisks) with 
debug turned on.  I don't know what much of the debug info means.  Is it 
giving you more clues?

http://localhost:8983/solr/EventLog/select?q=deeper&wt=json&indent=true&debugQuery=true

{
   "responseHeader":{
     "status":0,
     "QTime":2,
     "params":{
       "q":"deeper",
       "indent":"true",
       "wt":"json",
       "debugQuery":"true"}},
   "response":{"numFound":0,"start":0,"docs":[]
   },
   "debug":{
     "rawquerystring":"deeper",
     "querystring":"deeper",
     "parsedquery":"logtext:deeper",
     "parsedquery_toString":"logtext:deeper",
     "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},
         "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},
         "debug":{
           "time":0.0}}}}}

http://localhost:8983/solr/EventLog/select?q=*deeper*&wt=json&indent=true&debugQuery=true

{
   "responseHeader":{
     "status":0,
     "QTime":460,
     "params":{
       "q":"*deeper*",
       "indent":"true",
       "wt":"json",
       "debugQuery":"true"}},
   "response":{"numFound":45,"start":0,"docs":[
       {
         "id":"2012-07-10 13:23:39.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n923 AM EDT Tuesday, July 10, 
2012\n\nVery slow moving front has sagged down to the southernmost 
portion of the\nOhio Valley. This will keep the axis of convection along 
or south of the \nTN/KY border today and tomorrow, though some very 
light showers are \npossible in the northwest portion of the basin. On 
Thursday increased \nsoutherly flow over the Ohio Valley will begin to 
draw deeper moisture\nfarther north into the basin, but this will mainly 
be after the 48-hour\nforecast cutoff.\n\nDay 1 (8am EDT Tuesday - 8am 
EDT Wednesday):\nRain is forecast in southern Kentucky, southern West 
Virginia, middle\nTennessee and far western Virginia. Basin average 
amounts increase to the\nsouth with come areas approaching an inch. 
Light amounts less than 0.10 inch\nare expected in portions of central 
Indiana and Ohio. \n\nDay 2 (8am EDT Wednesday - 8am EDT Thursday): 
\nRain is forecast all areas south of the Ohio River as well as eastern 
\nIllinois, southern Indiana and southwest Pennsylvania. Basin average 
amounts\nincrease to the southwest with areas southwest of Nashville 
expecting \nover an inch. \n\nQPF from OHRFC, HPC, et al., can be seen 
at weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours support, 
the OHRFC cell number is 937-725-2222.\nLink Crawford "],
         "username":["crawford"],
         "_version_":1512928764746530816},
       {
         "id":"2012-07-10 17:39:09.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n139 PM EDT Tuesday, July 10, 
2012\n\n18Z Discussion:\nMade some changes to the first 6-hour period of 
the QPF, but otherwise made\nno changes to the previous 
issuance.\n\nPrevious Discussion (12Z):\nVery slow moving front has 
sagged down to the southernmost portion of the\nOhio Valley. This will 
keep the axis of convection along or south of the \nTN/KY border today 
and tomorrow, though some very light showers are \npossible in the 
northwest portion of the basin. On Thursday increased \nsoutherly flow 
over the Ohio Valley will begin to draw deeper moisture\nfarther north 
into the basin, but this will mainly be after the 48-hour\nforecast 
cutoff.\n\nDay 1 (8am EDT Tuesday - 8am EDT Wednesday):\nRain is 
forecast in southern Kentucky, southern West Virginia, middle\nTennessee 
and far western Virginia. Basin average amounts increase to the\nsouth 
with come areas approaching an inch. Light amounts less than 0.10 
inch\nare expected in portions of central Indiana and Ohio. \n\nDay 2 
(8am EDT Wednesday - 8am EDT Thursday): \nRain is forecast all areas 
south of the Ohio River as well as eastern \nIllinois, southern Indiana 
and southwest Pennsylvania. Basin average amounts\nincrease to the 
southwest with areas southwest of Nashville expecting \nover an inch. 
\n\nQPF from OHRFC, HPC, et al., can be seen at 
weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours support, 
the OHRFC cell number is 937-725-2222.\nLink Crawford    "],
         "username":["crawford"],
         "_version_":1512928764769599488},
       {
         "id":"2012-07-11 12:39:56.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n839 AM EDT Wednesday, July 11, 
2012\n\nOHRFC QPF Discussion (12Z):\n\nDewpoints in the upper 60's and 
70's will help fuel showers and thunderstorms \nacross the southern 
third of the basin today. This deeper moisture will\nslowly ooze 
northward this week as the Bermuda ridge gradually strengthens,\nthus 
placing the basin under the influence of a more southwestly flow. 
QPF\nis relatively tricky today as models remain in disagreement how 
far\nnorth/west the deeper moisture will traverse. We biased our QPF 
more toward\nthe Euro which keeps it farther south than all other 
models. Despite this\nmodel being an outlier, it goes along with the 
prevailing trend. \n\nDay 1 (8am EDT Wednesday - 8am EDT 
Thursday):\nShowers and storms are forecast across the southern third of 
the basin, and\nto a lesser extent in the higher terrain of WV and 
southwest PA. Parts of\nmiddle TN could top 1\" basin-average. \n\nDay 2 
(8am EDT Thursday - 8am EDT Friday): \nShowers and storms will develop 
farther north than Day 1, into parts of\neastern IL, southern and 
central IN, southern and central OH, and much of\nWV. Convection is also 
forecast to continue across areas south of the Ohio\nRiver. Again, 
heaviest amounts are forecast in middle TN and parts of\nsouthern KY 
with over 1\" basin-average. \n\nQPF from OHRFC, HPC, et al., can be 
seen at weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours 
support, the OHRFC cell number is 937-725-2222.\njm "],
         "username":["myers"],
         "_version_":1512928764810493952},
       {
         "id":"2012-07-11 18:18:56.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n218 PM EDT Wednesday, July 11, 
2012\n\n18Z Update: Made some minor changes to the first period to 
account for \nconvection firing across the southern and eastern basin 
this afternoon.\nOtherwise, besides tagging on an additional period 
Friday, no changes were\nmade to the forecast. \n\n\nPrevious Discussion 
(12Z):\n\nDewpoints in the upper 60's and 70's will help fuel showers 
and thunderstorms \nacross the southern third of the basin today. This 
deeper moisture will\nslowly ooze northward this week as the Bermuda 
ridge gradually strengthens,\nthus placing the basin under the influence 
of a more southwestly flow. QPF\nis relatively tricky today as models 
remain in disagreement how far\nnorth/west the deeper moisture will 
traverse. We biased our QPF more toward\nthe Euro which keeps it farther 
south than all other models. Despite this\nmodel being an outlier, it 
goes along with the prevailing trend. \n\nDay 1 (8am EDT Wednesday - 8am 
EDT Thursday):\nShowers and storms are forecast across the southern 
third of the basin, and\nto a lesser extent in the higher terrain of WV 
and southwest PA. Parts of\nmiddle TN could top 1\" basin-average. 
\n\nDay 2 (8am EDT Thursday - 8am EDT Friday): \nShowers and storms will 
develop farther north than Day 1, into parts of\neastern IL, southern 
and central IN, southern and central OH, and much of\nWV. Convection is 
also forecast to continue across areas south of the Ohio\nRiver. Again, 
heaviest amounts are forecast in middle TN and parts of\nsouthern KY 
with over 1\" basin-average. \n\nQPF from OHRFC, HPC, et al., can be 
seen at weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours 
support, the OHRFC cell number is 937-725-2222."],
         "username":["oper"],
         "_version_":1512928764835659776},
       {
         "id":"2012-07-11 23:41:50.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n741 PM EDT Wednesday, July 11, 
2012\n\nDiscussion (00Z):\n\nMoist air across the southern basin will 
keep showers and thunderstorms in\nthe forecast.  The deeper moisture 
will move farther north as southerly \nflow returns to the Ohio Valley.  
Stuck close to HPC this evening with\nminor adjustments for radar trends 
in the first 6 hr period.  Also cut \nback slightly on max amounts 
across the SW.  \n\nDay 1 (8pm EDT Wednesday - 8pm EDT 
Thursday):\nPrecip amounts up to 1.25\" are forecast across middle TN. 
Amounts taper \nto around 0.10\"  along the Ohio River.\n\nDay 2 (8pm 
EDT Thursday - 8pm EDT Friday):\nPrecip is forecast for almost the 
entire basin.  The highest forecast\namounts are across western 
KY...where up to 1.25\" is forecast.  Amounts \ntaper to 0.00\" across 
the NE.\n\nQPF from OHRFC, HPC, et al., can be seen at 
weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours support, 
the OHRFC cell number is 937-725-2222.\n  "],
         "username":["oper"],
         "_version_":1512928764890185728},
       {
         "id":"2012-07-12 12:45:36.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n845 AM EDT Thursday, July 12, 
2012\n\nOHRFC QPF Discussion (12Z):\n\nA stubborn front over the 
southern basin will continue to produce unsettled\nweather mainly south 
of the Ohio River today and tonight. A strengthening\nBermuda ridge will 
nudge the deeper moisture farther north and west Friday\nand into the 
weekend. A nearly stationary surface trough will interact with\nthe 
excessive moisture to generate showers and thunderstorms across a good 
\nportion of the middle Ohio Valley during this time period. Due to the 
high \namount of uncertainty, we are going pretty conservative with our 
QPF amounts. \nWe favored a SREF/Euro blend, but made plenty of 
additional tweaks to cut \nback the precip over the drier northwest part 
of the basin. In general, our \nQPF amounts are about half that of HPC 
throughout much of the basin. \n\nOHRFC 48-hr QPF Amounts ending 12Z 
Saturday: \n\nDay 1 (8am EDT Thursday - 8am EDT Friday):\nUnsettled 
weather will continue mainly along and south of the Ohio River. 
\nHeaviest amounts are forecast across much of KY and middle TN with 
basin\naverage amounts between 0.50\" to 1.50\". More isolated activity 
is expected\nnorth of the Ohio. \n\nDay 2 (8am EDT Friday - 8am EDT 
Saturday):\nThe axis of heavier precipitation will shift northward into 
north-central\nKY, far southern IL, southern IN, southern OH, northern 
and western WV, and\nsouthwest PA. Basin-average amounts should range 
from 0.25\" to 0.75\". \n\n\nQPF from OHRFC, HPC, et al., can be seen at 
weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours support, 
the OHRFC cell number is 937-725-2222.\njm   "],
         "username":["myers"],
         "_version_":1512928764967780352},
       {
         "id":"2012-07-12 18:02:33.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n202 PM EDT Thursday, July 12, 
2012\n\n18Z Update: New 18Z HPC QPF package appears to be a bit more 
conservative. We \nblended our first period toward their new guidance 
and made some additional \ntweaks for current radar trends/convection. 
Otherwise, no changes were\nneeded at this time. \n\nPrevious QPF 
Discussion (12Z):\n\nA stubborn front over the southern basin will 
continue to produce unsettled\nweather mainly south of the Ohio River 
today and tonight. A strengthening\nBermuda ridge will nudge the deeper 
moisture farther north and west Friday\nand into the weekend. A nearly 
stationary surface trough will interact with\nthe excessive moisture to 
generate showers and thunderstorms across a good \nportion of the middle 
Ohio Valley during this time period. Due to the high \namount of 
uncertainty, we are going pretty conservative with our QPF amounts. \nWe 
favored a SREF/Euro blend, but made plenty of additional tweaks to cut 
\nback the precip over the drier northwest part of the basin. In 
general, our \nQPF amounts are about half that of HPC throughout much of 
the basin. \n\nOHRFC 48-hr QPF Amounts ending 12Z Saturday: \n\nDay 1 
(8am EDT Thursday - 8am EDT Friday):\nUnsettled weather will continue 
mainly along and south of the Ohio River. \nHeaviest amounts are 
forecast across much of KY and middle TN with basin\naverage amounts 
between 0.50\" to 1.50\". More isolated activity is expected\nnorth of 
the Ohio. \n\nDay 2 (8am EDT Friday - 8am EDT Saturday):\nThe axis of 
heavier precipitation will shift northward into north-central\nKY, far 
southern IL, southern IN, southern OH, northern and western WV, 
and\nsouthwest PA. Basin-average amounts should range from 0.25\" to 
0.75\". \n\nQPF from OHRFC, HPC, et al., can be seen at 
weather.gov/ohrfc/Forecast.php\n$$\nFor critical after-hours support, 
the OHRFC cell number is 937-725-2222.\njm  "],
         "username":["myers"],
         "_version_":1512928765003431936},
       {
         "id":"2009-07-29 13:13:20.0",
         "category":[16],
         "logtext":["ZCZC CRWHCMTIR CES\nTTAA00 KTIR DDHHMM\n\n...FOR 
INTERGOVERNMENTAL AGENCY USE ONLY...\n\nHydromet Coordination 
Message\nOhio River Forecast Center, Wilmington, OH\n913 AM EDT 
Wednesday, July 29, 2009\n\nTo:   OHRFC WFOs\nFrom: OHRFC\n\nA cold 
front slowly working its way across the basin will result in 
more\nunsettled weather for much of the Ohio Valley today. Higher QPF 
totals are\nforecast across the eastern half of the region where the 
deeper moisture\nresides. A sizable break in the action is anticipated 
tonight before the\nnext wave moves into the western basin on Thursday. 
Overall, our forecast\nis very similar to HPC's QPF except for the usual 
radar based adjustments\nin the first period. \n\nOHRFC QPF Amounts 
through 12Z Thursday:\nA half inch or more is forecast for most of the 
eastern half of the Ohio\nValley, with amounts over an inch likely for 
the higher terrain. Generally\naround a quarter of an inch or less is 
forecast for the western side of the\nbasin. \n\n\n$$\njm    \nNNNN"],
         "username":["myers"],
         "_version_":1512928766474584064},
       {
         "id":"2010-08-28 11:04:33.0",
         "category":[16],
         "logtext":["TTAA00 KTIR DDHHMM\n\n...FOR INTERGOVERNMENTAL 
AGENCY USE ONLY...\n\nHydromet Coordination Message\nOhio River Forecast 
Center, Wilmington, OH\n704 AM EDT Saturday, August 28, 2010\n\nSome 
isolated showers are possible again over the New River basin and 
in\nmiddle Tennessee this afternoon. Otherwise, the Ohio Valley will 
remain dry\ntoday. On Sunday, the ridge axis will shift slightly 
eastward, just enough\nto allow deeper moisture to sneak into the 
southwestern Ohio Valley. \nOur QPF reflects this increased chance of 
showers and thunderstorms over\nmiddle TN, western KY, eastern IL, and 
far southwest IN. \n \n\n$$\nFor critical after-hours support, the OHRFC 
cell number is 937-725-2222.\njm "],
         "username":["myers"],
         "_version_":1512928767572443136},
       {
         "id":"2011-05-06 12:44:03.0",
         "category":[16],
         "logtext":["\nHydromet Coordination Message\nOhio River 
Forecast Center, Wilmington, OH\n844 AM EDT Friday, May 6, 2011\n\nTO: 
OHRFC HSAs\nFROM: OHRFC  \n\n***The Ohio River Forecast Center remains 
on 24 hour operations***\n\nOHRFC QPF Discussion:\n\nMild-mannered 
system to work its way across the Ohio Valley today with\nweak cold 
front currently pushing into western Ohio and middle Kentucky.\nThere 
will be a brief break after this system before the Saturday \nsystem 
moves into the western portion of the basin. This second 
system\nfeatures slightly deeper moisture, but still rainfall amounts 
should be\nmodest.  Utilized HPC's guidance for the QPF today, with the 
exception\nof adjustments to the first period to account current 
rainfall trends.\n\nOHRFC QPF Forecast through 8am EDT Sunday:\n\nDay 1: 
8am EDT Friday through 8am EDT Saturday:\nRain is forecast for most of 
the Ohio Valley. Amounts will generally be\n0.10 inch or less.\n\nDay 
2:  8am EDT Saturday through 8am EDT Sunday:\nRain is expected 
basinwide.  Most areas will see amounts in the 0.25 \nto 0.50 inch range 
with amounts up to 0.75 inch in southeast Kentucky.\n\nQPF from OHRFC, 
HPC, et al., can be seen at weather.gov/ohrfc/Forecast.php\n$$\nFor 
critical after-hours support, the OHRFC cell number is 
937-725-2222.\nLink Crawford "],
         "username":["crawford"],
         "_version_":1512928767842975744}]
   },
   "debug":{
     "rawquerystring":"*deeper*",
     "querystring":"*deeper*",
     "parsedquery":"logtext:*deeper*",
     "parsedquery_toString":"logtext:*deeper*",
     "explain":{
       "2012-07-10 13:23:39.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-10 17:39:09.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-11 12:39:56.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-11 18:18:56.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-11 23:41:50.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-12 12:45:36.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2012-07-12 18:02:33.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2009-07-29 13:13:20.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2010-08-28 11:04:33.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n",
       "2011-05-06 12:44:03.0":"\n1.0 = logtext:*deeper*, product of:\n  
1.0 = boost\n  1.0 = queryNorm\n"},
     "QParser":"LuceneQParser",
     "timing":{
       "time":460.0,
       "prepare":{
         "time":8.0,
         "query":{
           "time":8.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},
         "debug":{
           "time":0.0}},
       "process":{
         "time":451.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},
         "debug":{
           "time":450.0}}}}}





On 9/23/2015 8:54 AM, Mugeesh Husain wrote:
> Hi Mark,
>
> Search is not coming properly becuase you have taken  "ELall" field  as a
> text type which is not define properly.
>
> you have to modify the  schema.xml with these chance.
>
>
> <fieldType name="logtype" class="solr.TextField">
>    <analyzer type="index">
>      <tokenizer class="solr.StandardTokenizerFactory"/>
>      <filter class="solr.StandardFilterFactory"/>
>    </analyzer>
> </fieldType>
>    
>
> <field name="logtext" type="logtype" indexed="true" stored="true"
> required="true"/>
> <field name="ELall" type="logtype" indexed="true" stored="true"
> multiValued="true"/>
>
>
>
> --
> View this message in context: http://lucene.472066.n3.nabble.com/query-parsing-tp4230778p4230793.html
> Sent from the Solr - User mailing list archive at Nabble.com.
>


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