[Xapian-discuss] searching categories
james cauwelier
james.cauwelier at gmail.com
Mon Apr 27 09:08:38 BST 2009
Hi,
I am trying to index categories and to search within them. I index the
category text with prefix XCATEGORY and when I search for 'twilight box' I
get following results. The end of each line shows the indexed category, eg.
'Engelse boeken' for the first result. Adding '+category:engelse' or
'+category:boeken' to the search query does not give any results. If I do
the same for category 'audio' I do get results. Does this has something to
do with the fact that category 'audio' is just one word? Or does it have
something to do with the fact that most products are books and that this
information is not specific enough? How can I index and query categories
optimally?
Any help is very much appreciated.
[james at dev01 batch]$ php search.php --search 'twilight box'
Parsed query is: Xapian::Query((twilight:(pos=1) OR box:(pos=2)))
5888 results found:
1: 99% docid=1740397 [The Twilight Saga Collection Box Set (Meyer,
Stephenie), EAN: 9780316070362 RELEASE 2009-03-10 LANGUAGE E COVER CATEGORY
Engelse boeken]
2: 57% docid=577222 [Two by Twilight: Run from Twilight/Twilight Vows
(Shayne, Maggie), EAN: 9780778322665 RELEASE 2005-05-17 LANGUAGE E COVER ]
3: 57% docid=1632462 [TWILIGHT SINGERS, THE - TWILIGHT AS PLAYED BY THE TWIL
Audio CD, EAN: 5099750063224 RELEASE 2000-10-14 LANGUAGE COVER CATEGORY
Audio]
4: 57% docid=1427429 [The Twilight Herald: Book Two of the Twilight Reign
(Lloyd, Tom), Paperback, EAN: 9781591027331 RELEASE 2008-11-28 LANGUAGE E
COVER ]
5: 57% docid=636014 [Chomps: The Twilight Ghost: Beware the Terror in the
Town of Twilight! (Thiele, Colin), Paperback, EAN: 9780762426522 RELEASE
2009-01-27 LANGUAGE E COVER ]
6: 57% docid=683866 [Twilight (Hunter, Erin), EAN: 9780060827670 RELEASE
2006-11-11 LANGUAGE E COVER ]
7: 57% docid=27200 [Twilight (DVD-video), EAN: 87148655556863 RELEASE
2002-06-04 LANGUAGE E(N) COVER ]
8: 57% docid=30173 [Twilight (DVD-video), EAN: 8741865556863 RELEASE
2002-06-04 LANGUAGE E(N) COVER ]
9: 57% docid=181665 [Twilight Samurai, (DVD), EAN: 9789085140436]
10: 57% docid=409732 [Twilight (Wiesel, Marion), EAN: 9780805210583 RELEASE
2008-09-16 LANGUAGE E COVER ]
SEARCHING WITHIN 'ENGELSE BOEKEN'
[james at dev01 batch]$ php search.php --search 'twilight box
+category:engelse'
Parsed query is: Xapian::Query((XCATEGORYengel:(pos=3) AND_MAYBE
(twilight:(pos=1) OR box:(pos=2))))
0 results found:
SEARCHING WITHIN 'AUDIO'
[james at dev01 batch]$ php search.php --search 'enya +category:audio'
Parsed query is: Xapian::Query((XCATEGORYaudio:(pos=2) AND_MAYBE
enya:(pos=1)))
184027 results found:
1: 100% docid=1613986 [ENYA - WATERMARK Audio CD, EAN: 0022924387524 RELEASE
1988-10-14 LANGUAGE COVER CATEGORY Audio]
2: 100% docid=1627687 [ENYA - AMARANTINE Audio CD, EAN: 0825646279722
RELEASE 2005-11-26 LANGUAGE COVER CATEGORY Audio]
3: 99% docid=1621534 [ENYA - SHEPHERD MOONS Audio CD, EAN: 0090317557229
RELEASE 1991-11-12 LANGUAGE COVER CATEGORY Audio]
4: 99% docid=1575470 [VARIOUS - MUSIC OF ENYA Audio CD, EAN: 5397001017454
RELEASE 2008-01-08 LANGUAGE COVER CATEGORY Audio]
5: 99% docid=1627757 [ENYA - AMARANTINE (CHRISTMAS EDITION) Audio CD, EAN:
0825646414024 RELEASE 2006-11-19 LANGUAGE COVER CATEGORY Audio]
6: 99% docid=1623498 [ENYA - TRAINS AND WINTER RAINS
Single CD, EAN: 5051865134527 RELEASE 2008-12-09 LANGUAGE COVER CATEGORY
Audio]
7: 99% docid=1627540 [ENYA - ONLY TIME/THE COLLECTION Audio CD, EAN:
0809274921123 RELEASE 2002-12-10 LANGUAGE COVER CATEGORY Audio]
8: 99% docid=1613518 [ENYA - AND WINTER CAME
Audio CD, EAN: 0825646933068 RELEASE 2008-11-11 LANGUAGE COVER N CATEGORY
Audio]
9: 99% docid=1623314 [ENYA - PAINT THE SKY WITH STARS(BO) Audio CD, EAN:
0639842089524 RELEASE 1997-11-12 LANGUAGE COVER CATEGORY Audio]
10: 99% docid=1600997 [TALIESIN ORCHESTRA, THE - A TRIBUTE TO THE HITS OF
ENYA Audio CD, EAN: 8717278721088 RELEASE 2006-05-28 LANGUAGE COVER
CATEGORY Audio]
More information about the Xapian-discuss
mailing list