Skip to main content.
home | support | download

Back to List Archive

Re: search in xml files.

From: <dasoso(at)not-real.alumni.uv.es>
Date: Wed Apr 20 2005 - 17:55:32 GMT
> I don't think that's what Bill meant at all.
> The -T option is for *debugging* -- to discover what exactly is 
> being indexed and to help discover why what you expect is (or is 
> not) present in the index.

  Ok, I used the -T option, the words are present in the index.

:~/swish-e-2.4.3> swish-e -c swish-e.conf -T indexed_words
 .
 .
 .
- Using XML2 parser -
** Adding automatic MetaName 'book' found in file '/h..a/1.xml'
** Adding automatic MetaName 'title' found in file '/h..a/1.xml'
    Adding:[1:book(10)]   'tomy'   Pos:3  Stuct:0x1 ( FILE )
    Adding:[1:title(11)]   'tomy'   Pos:3  Stuct:0x1 ( FILE )
    Adding:[1:book(10)]   'sawyer'   Pos:4  Stuct:0x1 ( FILE )
    Adding:[1:title(11)]   'sawyer'   Pos:4  Stuct:0x1 ( FILE )
 .
 .
 .


swish-e-2.4.3> swish-e -k '*'
# SWISH format: 2.4.3
index.swish-e: sawyer smith tomy


swish-e-2.4.3> swish-e -w "book=tomy"
# SWISH format: 2.4.3
# Search words: book=tomy
# Removed stopwords:
# Number of hits: 1
# Search time: 0.001 seconds
# Run time: 0.024 seconds
1000 /h...a/1.xml "1.xml" 47

swish-e-2.4.3> swish-e -w "tomy"
# SWISH format: 2.4.3
# Search words: tomy
# Removed stopwords:
# Number of hits: 1
# Search time: 0.001 seconds
# Run time: 0.024 seconds
1000 /h...a/1.html "1.html" 41


 So I would like that the second search returns me the 1.html,
1.xml and 2.xml files. Any idea?


Thanks for the answer.

::::::::::::::
1.html
::::::::::::::
<html>
<body>
Tomy Sawyer
</body>
</html>
::::::::::::::

1.xml
::::::::::::::
<book>
   <title> Tomy Sawyer </title>
</book>
::::::::::::::
2.xml
::::::::::::::
<person>
    <name> Tomy Smith </name>
</person>
Received on Wed Apr 20 10:55:35 2005