>
>seems like you would need to be clever in defining your XML and then playing
>with the metanames (maybe using attributes to define "subfields"?).
>
You reply encouraged me enough to spend a few hours exploring Swish-E
tonight - so far I'm impressed .. yet... confused. :)
Along the lines of cleverly designing my XML, I wrote a script to extract
data from my database and create a XML stream which I call with "swish-e
-c test.conf -S prog". I just have it extracting one record for now so I
could mess around with the query part of it. I can't seem to get beyond
a "category" problem. Here is the output stream:
Path-Name: 278232
Content-Length: 236
Last-Mtime: 1120726768
Document-Type: XML*
<listing>
<id>278232</id>
<category>a a.b a.b.b a.b.b.g a.d a.d.c a.d.c.bc </category>
</listing>
In test.conf I have:
MetaNames jobdata_id category
. So to explain why I did this and what my expectations are:
#1. This sits in two categories "a.b.b.g" and "a.d.c.bc", which are
hierarchal in nature.
#2. This should come up with any searches of 'category=a',
'category='a.b', 'category='a.b.b', 'category='a.b.b.g', 'category='a.d',
'category='a.d.c', or 'category='a.d.c.bc'
Here are the results using 'swish -w category=X', where X is:
a = 1 result
a.b = 0 results
a.b.b = 0 results
a.b.b.g = 0 results
a.d = 0 results
a.d.c = 0 results
a.d.c.bc = 0 results
. Yet I can do things like "category=bc" and get a result....
I originally tried doing:
<listing>
<id>278232</id>
<category>a</category>
<category>a.b</category>
<category>a.b.b</category>
<category>a.b.b.g</category>
<category>a.d</category>
<category>a.d.c</category>
<category>a.d.c.bc</category>
</listing>
. but this didn't seem any better.... I feel as though I am missing
something very basic here, might you know what it is?....
There are a number of attributes which I need to add in this fashion
(state ids, etc) and I just can't figure out how to get the obvious
result I am after... :(
=====
I hesitate to bring this up in this response, but since it was part of my
original topic it perhaps isn't too far afield.
What I would really like is a way to say something like "swish-e -w UNIX'
and have it return to me something like this:
a 15
a.b 15
a.b.b 5
a.b.b.g 2
a.b.b.h 3
a.b 10
a.b.g 10
a.b.g.b 10
.. where the number to the right is the total count of matching records
for each category.
Is what I am after here possible with Swish-E? I know that I can feed
the output of it into a script to generate this summary, but this is slow
work... I know nothing about Swish-E is architected at this point, but
it almost seems like Swish-E would need to have everything it needs to
internally generate this summary very quickly.
=====
I have saved the rest of your response and when I get to that point I may
have a few more questions.. :) But so far I'm very pleased with the
performance, even after packing in all my data searches were plenty fast
enough.
- Greg
Received on Thu Jul 7 02:46:54 2005