Navigation Menu

Skip to content

Commit

Permalink
Be compliant to ACS return-fields behaviour
Browse files Browse the repository at this point in the history
  • Loading branch information
darashi committed Aug 22, 2012
1 parent 7c90d24 commit 5ad7fa8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/server.js
Expand Up @@ -79,7 +79,8 @@ app.get('/search', function(request, response, next) {
q: request.query.query,
start: parseInt((request.query.start || '0'), 10),
size: 20,
facet: 'path'
facet: 'path_facet',
'return-fields': 'title,desc,path'
};

if (request.query.in) {
Expand Down Expand Up @@ -120,7 +121,7 @@ app.get('/search', function(request, response, next) {
query: options.q,
records: results.hits.hit,
numFound: numFound,
pathFacets: results.facets.path.constraints,
pathFacets: results.facets.path_facet.constraints,
from: start + 1,
to: start + numReturned,
numShowing: numReturned,
Expand Down
1 change: 1 addition & 0 deletions tools/convert.js
Expand Up @@ -48,6 +48,7 @@ function parse(doc, context) {
}).filter(function(title) {
return title;
});
item.path_facet = item.path;
context.items.push(item);
context.index++;
}
Expand Down

0 comments on commit 5ad7fa8

Please sign in to comment.