I'm new to solr and I'm trying to build up a Question Answering system. I have indexed some Wikipedia pages, for example Nikola Tesla. https://en.wikipedia.org/wiki/Nikola_Tesla
My question is: It is possible and how to type a query as a question in Solr?
I splitted the Wikipedia page by "Contents" (corresponding to SectionTitle), so...for the query pageTitle:Nikola Tesla
my results are:
"response":{"numFound":23,"start":0,"docs":[
{
"sectionTitle":"First Paragraph",
"pageTitle":"Nikola Tesla",
"text":["Born and raised in the Austrian Empire, Tesla received an advanced education in engineering and physics in the 1870s and gained practical experience in the early 1880s working in telephony and at Continental Edison in the new electric power industry.]},
{
"sectionTitle":"Early years",
"pageTitle":"Nikola Tesla",
"text":["Nikola Tesla was born an ethnic Serb in the village Smiljan, Lika county, in the Austrian Empire (present day Croatia), on 10 July [O.S. 28 June] 1856. etc..]}]
}}
My schema
is the following:
<field name="id" type="string" indexed="true" required="true" stored="true"/>
<field name="pageTitle" type="text_en" indexed="true" stored="true"/>
<field name="sectionTitle" type="text_en" indexed="true" stored="true"/>
<field name="title" type="text_en" indexed="true" stored="true"/>
<field name="text" type="text_general" indexed="true" stored="true"/>
Is it possible to type a query as a question? And how to show results similar to the question? For example, looking above...
How can I type a query When Nikola Tesla born?
and obtain the paragraph:
"sectionTitle":"Early years",
"pageTitle":"Nikola Tesla",
"text":["Nikola Tesla was born an ethnic Serb in the village Smiljan, Lika county, in the Austrian Empire (present day Croatia), on 10 July [O.S. 28 June] 1856."]
Or a query Where Nikola Tesla born?
/ Where Nikola Tesla raised?
and obtain:
"Born and raised in the Austrian Empire, Tesla received...."?
Thanks in advance.