Hi,
I have some issues with stemming on spell corrections and auto completes.
Given below is a sample record from my docs.

<doc>
<field name="id">K-82</field>
<field name="GrantNumber">22570</field>
<field name="GrantTitle">Extension IPM Coordination Program</field>
<field name="FundingSponsor">US Department of Agriculture</field>
<field name="DateAwarded">2009-06-11T00:00:00Z</field>
<field name="AwardTotal">1800000</field>
<field name="ProgramName">Extension Integrated Management Coordination
Program</field>
<field name="DepartmentName">Agronomy</field>
<field name="DepartmentName">Entomology</field>
<field name="DepartmentName">Plant Pathology</field>
<field name="CollegeName">Agriculture</field>
<field name="CollegeName">Cooperative Extension</field>
<field name="InvestigatorName"> Phillips, Marcelo</field>
<field name="InvestigatorName"> Kennelly, James</field>
<field name="InvestigatorName"> Michaud, Alberto</field>
</doc>

This is the schema.xml

   <field name="id" type="string" indexed="true" stored="true"
required="true" />
   <field name="GrantNumber" type="string" indexed="true" stored="true"
required="true" />
   <field name="GrantTitle"  type="text" indexed="true" stored="true"/>

   <field name="FundingSponsor" type="text" indexed="true" stored="true" />
   <field name="fFundingSponsor" type="string" indexed="true" stored="false"
/>
   <copyField source="FundingSponsor" dest="fFundingSponsor"/>

   <field name="AwardTotal" type="float" indexed="true" stored="true" />

   <field name="ThroughSponsor" type="text" indexed="true" stored="true"
multiValued="true" />
   <field name="fThroughSponsor" type="string" indexed="true" stored="false"
multiValued="true" />
   <copyField source="ThroughSponsor" dest="fThroughSponsor"/>

   <field name="fSponsor" type="string" indexed="true" stored="false"
multiValued="true" />
   <copyField source="FundingSponsor" dest="fSponsor"/>
   <copyField source="ThroughSponsor" dest="fSponsor"/>

   <field name="ProgramName" type="text" indexed="text" stored="true" />
   <field name="DateAwarded" type="date" indexed="true" stored="true" />

   <field name="DepartmentName" type="text" indexed="true" stored="true"
multiValued="true" />
   <field name="fDepartmentName" type="string" indexed="true" stored="false"
multiValued="true" />
   <copyField source="DepartmentName" dest="fDepartmentName"/>

   <field name="CollegeName" type="text" indexed="true" stored="true"
multiValued="true" />
   <field name="fCollegeName" type="string" indexed="true" stored="false"
multiValued="true" />
   <copyField source="CollegeName" dest="fCollegeName"/>

   <field name="InvestigatorName" type="text" indexed="true" stored="true"
multiValued="true" protected="true" />
   <field name="fInvestigatorName" type="string" indexed="true"
stored="false" multiValued="true" />
   <copyField source="InvestigatorName" dest="fInvestigatorName"/>

   <field name="fSpell" type="text" indexed="true" stored="false"
multiValued="true" />
   <copyField source="FundingSponsor" dest="fSpell"/>
   <copyField source="ThroughSponsor" dest="fSpell"/>
   <copyField source="ProgramName" dest="fSpell"/>
   <copyField source="InvestigatorName" dest="fSpell"/>
   <copyField source="DepartmentName" dest="fSpell"/>

solrconfig.xml

  <searchComponent name="spellcheck" class="solr.SpellCheckComponent">

    <str name="queryAnalyzerFieldType">textSpell</str>

    <lst name="spellchecker">
      <str name="name">default</str>
  <str name="classname">solr.IndexBasedSpellChecker</str>
  <str name="field">*fSpell*</str>
      <str name="spellcheckIndexDir">./spellchecker</str>
  <str name="buildOnCommit">true</str>
  <str name="accuracy">0.5</str>
    </lst>

1) spelling issue
If I submit the following URL to get the spelling suggetions for
'humanites', I get 'human' instead of 'humanities'.
http://localhost:8983/solr/spell/?q=humanites&spellcheck=true&spellcheck.collate=true

It seems like if I change the type of 'fSpell' to 'string' the query would
not work. Any suggestions?

2) Auto complete issue

Currently I'm using the following URL for auto complete.
http://lib-dev-web1.lib.campus:8983/solr/terms?terms.fl=fSpell&terms.sort=index&terms.prefix=huma&indent=true&wt=php&omitHeader=true

Then I get 'human' as the only suggestion, but I would rather get
few suggestions like 'humanities', 'human ecology'.

I also tried the following URL.
http://lib-dev-web1.lib.campus:8983/solr/select/?incident=on&qt=dismax&facet=on&rows=0&facet.limit=10&facet.mincount=1&facet.field=GrantTitle&q=kansas&facet.prefix=st

For the auto complete I would like to be able to create a field with
Investigator names, Grant titles, Program names, department names, etc ..
and to match strings off that.  For example if I type 'hum' get
some suggestions as given below.

- Hummer, David (a name)
- Evaluation of Live Attenuated B. Melitensis Vaccines in Non-Human Primates
(a grant title)
- Program of global humanities (a program name)
- Humanities and Cultural bonding (a program name)
- Department of Human Nutrition (a department name)
- College of Human Ecology (a college name)
- Human-Robot Teams Informed By Human Performance Moderator Functions (a
grant title)

Any ideas on how to achieve this?

Thanks,
Dhanushka.

Reply via email to