I would like to know the best way to go about setting up a solr schema to search for something like “#10” within the data.
Thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
There’s actually quite a bit to your question, which I would break down as such:
Your schema design can’t really be determined without answering these questions.
Those questions are a much longer topic, so I’m not going to go through those ad nauseum here (read the Solr docs for greater understanding.)
In dealing with special characters, what you care about is the Analysis step in indexing, as you’ll want your terms stored in a way that permits you to logically retrieve them. Analyzers (can) use a variety tokenization strategies to apply stemming modifications to indexed content.
Analyzers are about breaking down term text; you’ll want to ensure your special characters survive analysis and end up being indexed. I would start looking at the with the WhitespaceAnalyzer, which leaves terms from source content in their exact state in the index. The Solr wiki page on Analyzers will give you an idea of how many of these function.