I also wrote another schema file that is supplied by Solr, I do have some questions. *The content of my text file is * #src dst proto ok sport dport pkts bytes flows first latest 192.168.220.135 26.147.238.146 6 1 32839 80 6 463 1 1237333861.465764000 1237333861.664701000
I chose my: *1. fieldType to be* : tint, tfloat, tlong, tdouble *2. tokenizer class*: solr.WhiteSpaceTokenizerFactory, solr.StandardTokenizerFactory, solr.HTMLStripWhitespaceTokenizerFactory *3. filter class : *solr.LengthFilterFactory, solr.TrimFilterFactory *4. filed name:* src, dst, proto, ok, sport, deport, poks bytes, flow, first, and latest *5. uniqueKey:* src, dst Are these modification legal accordingly to my text file? Also, if I put this schema.xml file to conf, what do I do with my text file? Thank you, Nga P. On Tue, Apr 14, 2009 at 9:28 AM, Shalin Shekhar Mangar < shalinman...@gmail.com> wrote: > On Tue, Apr 14, 2009 at 9:44 PM, Alex Vu <alex.v...@gmail.com> wrote: > > > > > *schema file is * > > <?xml version="1.0" encoding="UTF-8"?> > > <!--W3C Schema generated by XMLSpy v2009 sp1 (http://www.altova.com)--> > > <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> > > <xs:element name="networkTraffic"> > > <xs:complexType> > > <xs:sequence> > > <xs:element name="packet" maxOccurs="unbounded"> > > <xs:complexType> > > <xs:attribute name="terminationTimestamp" > > type="xs:string" use="required"/> > > <xs:attribute name="sourcePort" type="xs:string" > > use="required"/> > > <xs:attribute name="sourceIp" type="xs:string" > > use="required"/> > > <xs:attribute name="protocolPortNumber" > > type="xs:string" use="required"/> > > <xs:attribute name="packets" type="xs:string" > > use="required"/> > > <xs:attribute name="ok" type="xs:string" > > use="required"/> > > <xs:attribute name="initialTimestamp" > > type="xs:string" use="required"/> > > <xs:attribute name="flows" type="xs:string" > > use="required"/> > > <xs:attribute name="destinatoinIp" > type="xs:string" > > use="required"/> > > <xs:attribute name="destinationPort" > > type="xs:string" use="required"/> > > <xs:attribute name="bytes" type="xs:string" > > use="required"/> > > </xs:complexType> > > </xs:element> > > </xs:sequence> > > </xs:complexType> > > </xs:element> > > </xs:schema> > > > > > > Can someone please show me where do I put these files? I'm aware that > the > > schema.xsd file goes into the directory conf. What about my xml file, and > > txt file? > > > > Alex, the Solr schema is not the usual XML Schema (xsd). It is an xml file > which describes the fields, their analyzers, tokenizers, copyFields, > default > search field etc. > > Look into the example schema supplied by Solr (inside example/solr/conf) > directory and modify it according to your needs. > > -- > Regards, > Shalin Shekhar Mangar. >