what about the text file?

On Tue, Apr 14, 2009 at 9:23 AM, Alejandro Gonzalez <
alejandrogonzalezd...@gmail.com> wrote:

> now you should post (http post) your xml file (the schema must be in conf
> folder) to the url in wich it's supossed you have deployed Solr. Don forget
> to post a commit command after that or you won't see the results:
>
> The commit command it's just an xml this way:
>
> <commit></commit>
>
> On Tue, Apr 14, 2009 at 6:14 PM, Alex Vu <alex.v...@gmail.com> wrote:
>
> > Hi all,
> > I'm trying to use solr1.3 and trying to index a text file.  I wrote a
> > schema.xsd and a xml file.
> >
> > *The content of my text file is *
> > #src                               dst                        proto    ok
> > sport    dport    pkts    bytes    flows    first
> >                    atest
> > 192.168.220.135    26.147.238.146    6          1    32839    80
> > 6      463          1      1237333861.465764000    1237333861.664701000
> >
> > *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>
> >
> >
> > *and my xml file is *
> >
> > <?xml version="1.0" encoding="UTF-8"?>
> > <networkTraffic xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >
> >
> xsi:noNamespaceSchemaLocation="C:\DOCUME~1\tpham\Desktop\networkTraffic.xsd">
> >    <packet sourceIp="192.168.54.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="6" ok="1" sourcePort="32439" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.56.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="17" ok="1" sourcePort="32439" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.74.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="6" ok="1" sourcePort="32139" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.54.123" destinatoinIp="192.168.0.1"
> > protocolPortNumber="6" ok="1" sourcePort="32839" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.14.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="17" ok="1" sourcePort="32839" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.5.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="17" ok="1" sourcePort="32439" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.15.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="6" ok="1" sourcePort="36839" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> >    <packet sourceIp="192.168.24.23" destinatoinIp="192.168.0.1"
> > protocolPortNumber="6" ok="1" sourcePort="32839" destinationPort="80"
> > packets="6" bytes="463" flows="1" initialTimestamp="1237963861.465764000"
> > terminationTimestamp="1237963861.664701000"/>
> > </networkTraffic>
> >
> >
> >
> > 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?
> >
> > Thank you,
> > Alex
> >
> >
> > On Tue, Apr 14, 2009 at 12:37 AM, Alejandro Gonzalez <
> > alejandrogonzalezd...@gmail.com> wrote:
> >
> > > you should construct the xml containing the fields defined in your
> > > schema.xml and give them the values from the text files. for example if
> > you
> > > have an schema defining two fields "title" and "text" you should
> > construct
> > > an xml with a field "title" and its value and another called "text"
> > > containing the body of your doc. then you can post it to Solr you have
> > > deployed and make a commit an it's done. it's possible to construct an
> > xml
> > > defining more than jus t a doc
> > >
> > >
> > > <add>
> > > <doc>
> > > <field name="title">"doc1 title"</field>
> > > <field name="text">"doc1 text"</field>
> > > </doc>
> > > .
> > > .
> > > .
> > > <doc>
> > > <field name="title">"docn title"</field>
> > > <field name="text">"docn text"</field>
> > > </doc>
> > > </add>
> > >
> > >
> > >
> > > 2009/4/14 Noble Paul നോബിള്‍ नोब्ळ् <noble.p...@gmail.com>
> > >
> > > > what is the cntent of your text file?
> > > > Solr does not directly index files
> > > > --Noble
> > > >
> > > > On Tue, Apr 14, 2009 at 3:54 AM, Alex Vu <alex.v...@gmail.com>
> wrote:
> > > > > Hi all,
> > > > >
> > > > > Currently I wrote an xml file and schema.xml file.  What is the
> next
> > > step
> > > > to
> > > > > index a txt file?  Where should I put my txt file I want to index?
> > > > >
> > > > > thank you,
> > > > > Alex V.
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > --Noble Paul
> > > >
> > >
> >
>

Reply via email to