Skip to content

Commit

Permalink
use simple_query_string for query in autocomplete
Browse files Browse the repository at this point in the history
  • Loading branch information
andreeap committed Mar 19, 2015
1 parent c776371 commit ec206a3
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions lib/MetaCPAN/Document/File.pm
Expand Up @@ -1006,8 +1006,14 @@ sub autocomplete {
my @query = split( /\s+/, $query );
my $should = [
map {
{ field => { 'documentation.analyzed' => "$_*" } },
{ field => { 'documentation.camelcase' => "$_*" } }
{
simple_query_string => {
fields => [
'documentation.analyzed', 'documentation.camelcase'
],
query => "$_*"
}
}
} grep {$_} @query
];

Expand Down

0 comments on commit ec206a3

Please sign in to comment.