Skip to main content.
home | support | download

Back to List Archive

Re: [swish-e] Change the indexed 'title'

From: <josh(at)not-real.relativelysane.com>
Date: Thu Oct 25 2007 - 13:33:33 GMT
>
>On 10/25/2007 06:32 AM, josh@relativelysane.com wrote:
>
>> I literally duplicated what you wrote; to test and play around with (as you 
>said, with a small sample set). I have 3 directories (docsthatarenormal, 
>docswith-ahref, docswith-strong); in each is one file - which are identical to 
>what you used in your example.
>> 
>> I created a conf file that has the following lines:
>>    IndexDir .
>
>pretty close. I did not have IndexDir in my example, and the presence of that
>dot is throwing off the regex in ExtractPath.
>
>>    ExtractPath flavor regex !^([^/]+)/.*$!$1!
>
>If you want to use IndexDir, then try this regex instead:
>
> ExtractPath flavor regex !/(docs(that|with)[^/]+)/.*$!$1!
>
>or better yet, rename your dirs to be consistent in syntax:
>
> docs-normal
> docs-strong
> docs-href
>
>and then can use a regex like:
>
> ExtractPath flavor regex !/docs-(normal|strong|href)/.*$!$1!
>
>
>>    PropertyNames strong a flavor
>> 
>
>
>-- 
>Peter Karman  .  peter(at)not-real.peknet.com  .  http://peknet.com/
>


Peter,

I did as you suggested (first I tried, ExtractPath flavor regex !^([^/]+)/.*$!$1!, and then i did rename the directories and then tried your second ExtractPatch string)  and I am still getting same response, err, and results. The results below are from the renamed directories suggestion you made.

[josh@josh]# swish-e -c index.cfg
Indexing Data Source: "File-System"
Indexing "."
Removing very common words...
no words removed.
Writing main index...
Sorting words ...
Sorting 29 words alphabetically
Writing header ...
Writing index entries ...
  Writing word text: Complete
  Writing word hash: Complete
  Writing word data: Complete
29 unique words indexed.
7 properties sorted.
6 files indexed.  401,713 total bytes.  63 total words.
Elapsed time: 00:00:00 CPU time: 00:00:00
Indexing done!


[josh@josh]# # swish-e -w title AND flavor=strong -x '"<strong>" "<swishtitle>" "<flavor>"\n'
# SWISH format: 2.4.5
# Search words: title AND flavor=strong
# Removed stopwords:
err: no results
.


[josh@josh]# swish-e -w title -x '"<strong>" "<swishtitle>" "<flavor>"\n'
# SWISH format: 2.4.5
# Search words: title
# Removed stopwords:
# Number of hits: 5
# Search time: 0.000 seconds
# Run time: 0.009 seconds
"" "read title - this is the title i want" ""
"" "read title" ""
"" "read title" ""
.

josh
_______________________________________________
Users mailing list
Users@lists.swish-e.org
http://lists.swish-e.org/listinfo/users
Received on Thu Oct 25 09:33:33 2007