Browse Source

Merge pull request #7 from pelias/search

Search
pull/11/head
Harish Krishna 10 years ago
parent
commit
7d5677edb3
  1. 2
      controller/search.js
  2. 2
      query/search.js

2
controller/search.js

@ -21,7 +21,7 @@ function setup( backend, query ){
// handle backend errors
if( err ){ return next( err ); }
if( data && data.hits && data.hits.total){
if( data && data.hits && data.hits.total && Array.isArray(data.hits.hits)){
docs = data.hits.hits.map( function( hit ){
return hit._source;
});

2
query/search.js

@ -25,7 +25,7 @@ function generate( params ){
"size": params.size
};
logger.log( 'cmd', JSON.stringify( cmd, null, 2 ) );
// logger.log( 'cmd', JSON.stringify( cmd, null, 2 ) );
return cmd;
}

Loading…
Cancel
Save