lucy-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Saurabh Vasekar <>
Subject [lucy-user] How to add more languages in an analyzer and change path to store indexed documents
Date Wed, 13 Jun 2012 19:29:56 GMT

I am a beginner to Lucy. This is the first time I am using a Search
library. I went through the tutorial at I am confused over
the following things mentioned in the tutorial.

The tutorial mentions that we can specify the language in which the
documents are. Hence while indexing how can I specify multiple languages in
the analyzers if my documents are in different languages.

my $polyanalyzer = Lucy::Analysis::PolyAnalyzer->new(
       language => 'en',

How can I specify multiple languages such as Danish, German, Finnish etc

Secondly the path_to_index given in the tutorial is '/store/lucy_test'.
This path was given in the sample tutorial when I downloaded the
apache-lucy-0.3.1 library. Now if I want to change this path meaning I want
to store my indexed documents at a different location how can I do that?
The location /store/lucy_test contains different sub-folder viz. locks,
schema_26.json, set_26, snapshot_26.json

The code in is

my $path_to_index = '/store/lucy_test';

use Lucy::Index::Indexer;

my $indexer = Lucy::Index::Indexer->new(
      index => $path_to_index,
      schema => $schema,
      create => 1,
      truncate => 1,

Also what do the 'create'  and 'truncate' parameters specify in this case?

I changed the default path in the tutorial '/store/lucy_test' to
'/store_test'. The script ran perfectly. Then in the I made the same change to the $path_to_index variable. It
gave the following error -

*Index doesn't seem to contain any data*
* lucy_IxReader_do_open at
After I made the change to the $path_to_index variable in and
ran the script the following folders were created in the path - locks and

I am terribly stuck and I am not able to go forward. Please bear with the
question. Thank you for you patience.

Thank you.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message