If you do:
swish-e -f yourindex -T index_metanames
you can see this:
swishfilenum : id= 4 type=42 META_INTERNAL META_PROP:NUMBER
in a search, the property 'swishfilenum' is available like any other
swish-e -f myindex -w foo -x '<swishfilenum>\n'
# SWISH format: 2.4.1
# Search words: foo
# Removed stopwords:
# Number of hits: 13
# Search time: 0.046 seconds
# Run time: 0.141 seconds
With SWISH::API I think you use the $result->Propery( "swishfilenum" )
That's only one way to access the filenum (returning it as a property)
and it only works after you've searched. If you wanted to know the
filenum *before* searching, use this:
swish-e -f myindex -T index_files
and then parse that out to a db or file or whatever.
Hope that helps.
Jason Camp wrote on 8/30/04 12:34 AM:
> I'm writing an application around swish-e and I have a bunch of data stored in a
> database that I'd like to reference on search requests. I read that swish-e
> uses an internal numbered index for each search result, is there any way to
> access that number? I figure it would be the easiest way to associate the
> search results with the information in the database, I could base it off of the
> URL but the db operations would be much faster if it was numeric. Anyone have
> any thoughts? I looked through the properties list and I didn't see anything
> that looked to be the internal number. I'm using the SWISH::API perl module if
> that helps. Thanks!
Peter Karman 651-605-9009 email@example.com
Received on Mon Aug 30 04:54:43 2004