I think you need to back up a step or three here. If I'm reading your messages right, you've essentially taken an arbitrary file, renamed it and tried to index it. This won't work unless you make your schema match, and the xml file has the proper tags.
SOLR doesn't magically index arbitrary XML. The tools provided take a very specific XML format and recognized tags that indicate "actions", like <add> <doc> <field1>value</field1> . . . </doc> </add> If the XML you try to index doesn't follow these conventions, nothing will get indexed. Furthermore, the schema.xml has to define how to store the fields specified above, for instance, you have to have a <field>...</field> definition in your schema.xml that corresponds to the tags inside the document. So I'd back up and work through the tutorial *without* trying anything new until you got that working. Then make a few changes (add new fields, do a few searches, etc). Or at least make your custom file follow the same format as the example file, with the same tags and structure. If this is waaaay off base, you need to provide some examples of what you're trying to index, your schema file, and more details about what doesn't work. HTH Erick On Fri, Mar 5, 2010 at 7:59 AM, mamathahl <mamatha...@gmail.com> wrote: > > The body field is of "string" type. When it was tried giving "text", it > gives error. There is nothing called Textparser. Its a stringparser. The > body content of a few records are really huge. I am not sure whether > string > can handle such huge amount of data. When ant index is done, it says > "Indexing done in [some time such as 2084 ms] for 0 docs." I'm not sure of > the reason why indexing is not happening. Without getting this step right, > I'm unable to move ahead. Everything has come to a standstill. Please > help > me resolve this problem. > > Lance Norskog-2 wrote: > > > > Is the 'body' field a text type? If it is a string, searching for > > words will not work. > > > > Does search for 'id:1' work? > > > > On Thu, Mar 4, 2010 at 3:44 AM, mamathahl <mamatha...@gmail.com> wrote: > >> > >> I forgot to mention that I have been working on geo-saptial examples > >> downloaded from > >> http://www.ibm.com/developerworks/java/library/j-spatial/. > >> I have replaced the OSM files(data) which initially existed, with my > data > >> (i.e XML file with OSM extension). My XML file has many data records. > >> The > >> 1st record is shown below. > >> <row id="1" lat="47.8956" lng="-73.5412" body="........Some relevant > >> text........" > >> I use the following commands to index and retrieve the data: > >> ant index > >> ant start-solr > >> and then hit the url http://localhost:8983/solr/admin > >> But when a keyword that exists in the data file is given, I get the > >> following > >> - > >> <response> > >> - > >> <lst name="responseHeader"> > >> <int name="status">0</int> > >> <int name="QTime">0</int> > >> - > >> <lst name="params"> > >> <str name="indent">on</str> > >> <str name="start">0</str> > >> <str name="q">DRI</str> > >> <str name="version">2.2</str> > >> <str name="rows">10</str> > >> </lst> > >> </lst> > >> <result name="response" numFound="0" start="0"/> > >> </response> > >> Since there is no error message being displayed, I'm unable to figure > out > >> what is going wrong. Kindly help me by providing an appropriate > >> solution. > >> > >> mamathahl wrote: > >>> > >>> I'm very new to Solr. I downloaded apache-solr-1.5-dev and was trying > >>> out > >>> the example in order to first figure out how Solr is working. I found > >>> out > >>> that the data directory consisted of .OSM files. But I have an XML > file > >>> consisting of latitude, longitude and relevant news for that location. > >>> Can I just use the XML file to index the data or is it necessary for me > >>> to > >>> convert this file to .OSM file using some tool and then proceed > further? > >>> Also the attribute value from the .OSM file is being considered in that > >>> example. Since there are no attributes for the tags in my XML file, > how > >>> can I extract only the contents of my tags?Any help in this direction > >>> will > >>> be appreciated. Thanks in advance. > >>> > >> > >> -- > >> View this message in context: > >> > http://old.nabble.com/Can-I-used-.XML-files-instead-of-.OSM-files-tp27769082p27779694.html > >> Sent from the Solr - User mailing list archive at Nabble.com. > >> > >> > > > > > > > > -- > > Lance Norskog > > goks...@gmail.com > > > > > > -- > View this message in context: > http://old.nabble.com/Can-I-used-.XML-files-instead-of-.OSM-files-tp27769082p27793567.html > Sent from the Solr - User mailing list archive at Nabble.com. > >