Skip to content
This repository has been archived by the owner on Dec 22, 2022. It is now read-only.

issue [pds-api-54]: wildcard searching #15

Merged
merged 21 commits into from
May 6, 2021
Merged
Show file tree
Hide file tree
Changes from 13 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -226,13 +226,13 @@
<dependency>
<groupId>gov.nasa.pds</groupId>
<artifactId>api-search-query-lexer</artifactId>
<version>0.0.1-SNAPSHOT</version>
<version>0.2.0-SNAPSHOT</version>
</dependency>

<dependency>
<groupId>com.tunnelvisionlabs</groupId>
<groupId>org.antlr</groupId>
<artifactId>antlr4-runtime</artifactId>
<version>4.7</version>
<version>4.9.2</version>
</dependency>

<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@

import javax.servlet.http.HttpServletRequest;

import org.antlr.v4.runtime.misc.ParseCancellationException;
import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.search.SearchRequest;
Expand Down Expand Up @@ -210,7 +211,10 @@ protected ResponseEntity<Products> getProductsResponseEntity(String q, int start
log.error("Couldn't serialize response for content type " + accept, e);
return new ResponseEntity<Products>(HttpStatus.INTERNAL_SERVER_ERROR);
}

catch (ParseCancellationException pce) {
log.error("Could not parse the query string: " + q);
return new ResponseEntity<Products>(HttpStatus.UNPROCESSABLE_ENTITY);
al-niessner marked this conversation as resolved.
Show resolved Hide resolved
}
}
else return new ResponseEntity<Products>(HttpStatus.NOT_IMPLEMENTED);
}
Expand Down
Loading