[
https://issues.apache.org/jira/browse/LUCY-299?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15234924#comment-15234924
]
Nick Wellnhofer commented on LUCY-299:
--------------------------------------
I couldn't reproduce the issue with the following Perl script, tested under
0.4.4 and 0.5.0. I tried to replicate the schema you described but maybe
there's something missing. Could you provide a minimal, self-contained test
case?
{noformat}
#!/usr/bin/perl
use strict;
use warnings;
use Lucy;
my $schema = Lucy::Plan::Schema->new;
my $easyanalyzer = Lucy::Analysis::EasyAnalyzer->new(
language => 'en',
);
my $type = Lucy::Plan::FullTextType->new(
analyzer => $easyanalyzer,
);
$schema->spec_field( name => 'title', type => $type );
my $blob_type = Lucy::Plan::BlobType->new( stored => 1 );
$schema->spec_field( name => 'content', type => $blob_type );
my $indexer = Lucy::Index::Indexer->new(
schema => $schema,
index => 'index',
create => 1,
truncate => 1,
);
$indexer->add_doc({
title => 'abc',
content => 'def',
});
$indexer->commit;
my $searcher = Lucy::Search::IndexSearcher->new(
index => 'index'
);
print("String search\n");
search('abc');
print("TermQuery search\n");
search(
Lucy::Search::TermQuery->new(
field => 'title',
term => 'abc',
),
);
sub search {
my $query = shift;
my $hits = $searcher->hits( query => $query );
while ( my $hit = $hits->next ) {
print "$hit->{title}: $hit->{content}\n";
}
}
{noformat}
> Using Blob field type stops search working on other fields
> ----------------------------------------------------------
>
> Key: LUCY-299
> URL: https://issues.apache.org/jira/browse/LUCY-299
> Project: Lucy
> Issue Type: Bug
> Components: Core
> Affects Versions: 0.4.4
> Environment: Ubuntu 15.10
> Reporter: DGB
> Labels: github-import, newbie
>
> Running into an apparent issue using BlobType_new to create FieldType.
> Scenario:
> Creating a schema with two fields, "fullpath" and "title". Using EasyAnalyzer.
> Add a couple of entries to the index
> Issued a search against the index
> Problem: If for fullpath field I use BlobType_new for FieldType, no search
> match is found. However, if I use either FullTextType_new or StringType_new
> for the schema FieldType of fullpath, it works fine.
> If I do not add fullpath at all, not to schema nor of course with Doc_Store -
> i.e. just have a single field of title - my scenario works fine (get a search
> hit).
> If I add fullpath to the schema, but not to the doc entries (via Doc_Store),
> it works fine (get a search hit).
> It makes no difference (still get no match) if add fullpath before or after
> title.
> It makes no difference (still get no match) whether I pass true or false as
> parm to BlobType_new.
> In all cases, FieldType for title is fulltext; and it is title that is
> generating the matches against the search query.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)