Hi,
Currently I have a student search which allows me to search for documents
in a school. I am looking at including year search into the existing schema
which would enable users to search for students in a school during an year.
I have a proposed change in the schema to add the year component to
facilitate this search.
Existing schema: (No year information currently)
field name=id type=string indexed=true stored=true required=true
multiValued=false /
field name=name type=text_general indexed=true stored=true /
field name=schoolName type=text_general indexed=true stored=true
multiValued=true/
Current sample data:
name:Borris Mayers
schoolName:Canterbury University
New schema:
field name=id type=string indexed=true stored=true required=true
multiValued=false /
field name=name type=text_general indexed=true stored=true /
field name=schoolName type=text_general indexed=true stored=true
multiValued=true/
field name=schoolNameWithTermOriginal type=string indexed=false
stored=true multiValued=true/
Sample data:
name:Borris Mayers
schoolName:Canterbury University, start_2001, year_2001, year_2002,
year_2003, year_2004, year_2005, end_2005
schoolNameWithTermOriginal:Canterbury University||2001-2005
Please suggest if its a correct approach or there is a better way to do the
same.
I am using Solr 4.3.
Thanks,
Rohit Kumar