Thanks, my documents are xml files i am attaching that document in this and in my project i have to search from each field defined in schema.xml
and my output should be in solr is like { "responseHeader": { "status": 0, "QTime": 1, "params": { "indent": "true", "q": "State:Delhi", "_": "1394085162344", "wt": "json" } }, "response": { "numFound": 2, "start": 0, "docs": [ { "SrNo": 3, "text": [ "3", "RGNF-2013-2015-4841", "AASHRITI GAUTAM LMANF", "GEN", "Delhi", "17/11/1992", "sagittariusaashriti....@gmail.com", "B.A", "RGNF", "Social Sciences", "University of Jammu", "78.84", "First", " ", "State University", "9282", "M.A", "Politics (Specialization in International Relations)", "7/22/2013", "Jawahar Lal Nehru", "BHAGWATI CHARAN SHARMA", "DA-10- DDA-FLATS- MUNIRKA NEW DELHI NEW DELHI 110067", " ", "JAHANVI", "Unverified", "" ], "CandidateID": "RGNF-2013-2015-4841", "Name": "AASHRITI GAUTAM LMANF", "Category": "GEN", "State": "Delhi", "DOB": "17/11/1992", "Email": "sagittariusaashriti....@gmail.com", "UGExam": "B.A", "Scheme": "RGNF", "UGSubject": "Social Sciences", "UGCollageORUniversity": "University of Jammu", "UGInPersentage": "78.84", "Rank": "First", "UGRankSubject": " ", "StatusOFUGInstituteORCollageORUniversity": "State University", "NoOfStudentsAppered": "9282", "PGDegree": "M.A", "PGSubject": "Politics (Specialization in International Relations)", "DateOfPGAdmission": "7/22/2013", "PGCollageORUniversity": "Jawahar Lal Nehru", "FatherName": "BHAGWATI CHARAN SHARMA", "Address": "DA-10- DDA-FLATS- MUNIRKA NEW DELHI NEW DELHI 110067", "Contect": " ", "Updated_By": "JAHANVI", "FinalRemarks": "Unverified", "_version_": "1461765344581386240" }, { "SrNo": 8, "text": [ "8", "URH-2013-2015-1888", "ABHISHEK MISHRA", "GEN", "Delhi", "09/11/1992", "a.sudham...@yahoo.com", "B.SC CHEMISTRY", "RGNF", "Chemical Sciences", "Queen marys college/madras university", "66.5", "Second", "chemisty", "State University", "446", "M.A.", "Politics (Specialization in International Relations)", "7/22/2013", "Jawahar Lal Nehru", "PARTHA SARATHI BHATTACHARYA", "DA-10- DDA-FLATS- MUNIRKA NEW DELHI NEW DELHI 110067", "7278635773", "RAVI", "Duplicate", "" ], "CandidateID": "URH-2013-2015-1888", "Name": "ABHISHEK MISHRA", "Category": "GEN", "State": "Delhi", "DOB": "09/11/1992", "Email": "a.sudham...@yahoo.com", "UGExam": "B.SC CHEMISTRY", "Scheme": "RGNF", "UGSubject": "Chemical Sciences", "UGCollageORUniversity": "Queen marys college/madras university", "UGInPersentage": "66.5", "Rank": "Second", "UGRankSubject": "chemisty", "StatusOFUGInstituteORCollageORUniversity": "State University", "NoOfStudentsAppered": "446", "PGDegree": "M.A.", "PGSubject": "Politics (Specialization in International Relations)", "DateOfPGAdmission": "7/22/2013", "PGCollageORUniversity": "Jawahar Lal Nehru", "FatherName": "PARTHA SARATHI BHATTACHARYA", "Address": "DA-10- DDA-FLATS- MUNIRKA NEW DELHI NEW DELHI 110067", "Contect": "7278635773", "Updated_By": "RAVI", "FinalRemarks": "Duplicate", "_version_": "1461765344630669312" } ] } } Regards, Kishan Parmar Software Developer +91 95 100 77394 Jay Shree Krishnaa !! On Thu, Mar 6, 2014 at 2:23 AM, Ahmet Arslan <iori...@yahoo.com> wrote: > Hi Kishan, > > can you please give us example document query pair that query should > retrieve that document. > > e.g. query q=State:"tamil nadu" should return what document text? > > Ahmet > > > > On Wednesday, March 5, 2014 9:04 PM, Kishan Parmar <kishan....@gmail.com> > wrote: > Thanks , > but > still no change in output ---> q=State:"tamil nadu" it parse as > > "q": "State:\"tamil nadu\"" > > > Regards, > > Kishan Parmar > Software Developer > +91 95 100 77394 > Jay Shree Krishnaa !! > > > > > 2014-03-06 0:17 GMT+05:30 Ahmet Arslan <iori...@yahoo.com>: > > > Hi, > > > > I suspect q=State:tamil nadu parsed as State:tamil text:nadu. You can > > confirm this by adding debugQuery=on. > > > > Either use quotes q=State:"tamil nadu" > > or use term query parser q={!term f=State}tamil nadu > > > > Ahmet > > > > > > > > On Wednesday, March 5, 2014 8:29 PM, Kishan Parmar <kishan....@gmail.com > > > > wrote: > > hi there > > my schema file is this---------------------------> > > <?xml version="1.0" encoding="UTF-8" ?> > > <schema name="example" version="1.2"> > > <types> > > <fieldType name="string" class="solr.StrField" > sortMissingLast="true" > > omitNorms="true" /> > > <fieldType name="int" class="solr.TrieIntField" precisionStep="0" > > omitNorms="true" positionIncrementGap="0" /> > > <fieldType name="date" class="solr.TrieDateField" omitNorms="true" > > precisionStep="0" positionIncrementGap="0" /> > > <fieldType name="text" class="solr.TextField" > > positionIncrementGap="100"> > > <analyzer type="index"> > > <tokenizer class="solr.WhitespaceTokenizerFactory" /> > > <filter class="solr.StopFilterFactory" ignoreCase="true" > > words="stopwords.txt" enablePositionIncrements="true" /> > > <filter class="solr.WordDelimiterFilterFactory" > > generateWordParts="2" generateNumberParts="2" catenateWords="2" > > catenateNumbers="2" catenateAll="1" splitOnCaseChange="2" /> > > <filter class="solr.LowerCaseFilterFactory" /> > > <filter class="solr.SnowballPorterFilterFactory" > > language="English" protected="protwords.txt" /> > > </analyzer> > > <analyzer type="query"> > > <tokenizer class="solr.WhitespaceTokenizerFactory" /> > > <filter class="solr.SynonymFilterFactory" > synonyms="synonyms.txt" > > ignoreCase="true" expand="true" /> > > <filter class="solr.StopFilterFactory" ignoreCase="true" > > words="stopwords.txt" enablePositionIncrements="true" /> > > <filter class="solr.WordDelimiterFilterFactory" > > generateWordParts="2" generateNumberParts="2" catenateWords="1" > > catenateNumbers="1" catenateAll="1" splitOnCaseChange="2" /> > > <filter class="solr.LowerCaseFilterFactory" /> > > <filter class="solr.SnowballPorterFilterFactory" > > language="English" protected="protwords.txt" /> > > </analyzer> > > </fieldType> > > </types> > > <fields> > > <field name="SrNo" type="int" indexed="true" stored="true" > > required="true" /> > > <field name="Name" type="string" indexed="true" stored="true" > > required="true" /> > > <field name="Scheme" type="string" indexed="true" stored="true" > > required="true" /> > > <field name="State" type="string" indexed="true" stored="true" > > required="true" /> > > <field name="text" type="text" indexed="true" stored="true" > > multiValued="true" /> > > <field name="_version_" type="string" indexed="true" stored="true" > > required="true" multiValued="false" /> > > </fields> > > > > <copyField source="SrNo" dest="text" /> > > <copyField source="Name" dest="text" /> > > <copyField source="Scheme" dest="text" /> > > <copyField source="State" dest="text" /> > > > > <uniqueKey>SrNo</uniqueKey> > > <defaultSearchField>text</defaultSearchField> > > <solrQueryParser defaultOperator="AND" /> > > </schema> > > ----------------> > > and when i try to query in solr 4.6.0 which is "State:tamil nadu" it > gives > > 0 result but is there any problem with whitesapce in type="String" > > > > Regards, > > > > Kishan Parmar > > Software Developer > > +91 95 100 77394 > > Jay Shree Krishnaa !! > > > > > >
<?xml version="1.0"?> <add> <doc> <field name="SrNo" tag="10">2</field> <field name="CandidateID" tag="11">MANF-2013-2015-6454</field> <field name="Name" tag="12">A.VALARMATHI</field> <field name="Category" tag="13">OBC</field> <field name="State" tag="14">Tamil Nadu</field> <field name="DOB" tag="15">29/03/1992</field> <field name="Email" tag="16">valarmathi....@gmail.com</field> <field name="UGExam" tag="17">B.SC CHEMISTRY</field> <field name="Scheme" tag="18">MANF</field> <field name="UGSubject" tag="19">Chemical Sciences</field> <field name="UGCollageORUniversity" tag="110">Queen marys college/madras university</field> <field name="UGInPersentage" tag="111">78.93</field> <field name="Rank" tag="112">Second</field> <field name="UGRankSubject" tag="113">chemisty</field> <field name="StatusOFUGInstituteORCollageORUniversity" tag="114">Autonomous College</field> <field name="NoOfStudentsAppered" tag="115">56</field> <field name="PGDegree" tag="116">Msc</field> <field name="PGSubject" tag="117">chemistry</field> <field name="DateOfPGAdmission" tag="118">7/30/2013</field> <field name="PGCollageORUniversity" tag="119">Queen marys college(A)</field> <field name="FatherName" tag="120">K.ARCHUNAN</field> <field name="Address" tag="121">no 3/289 new street-mazhavanthagangal-gingee tk-villupuram dist. villupuram 905701</field> <field name="Contect" tag="122">9500131452</field> <field name="Updated_By" tag="123">RAVI</field> <field name="FinalRemarks" tag="124">Awarded</field> <field name="text" tag="125" /> </doc> </add>