Line | |
---|
1 | package dbnp.query |
---|
2 | |
---|
3 | import org.compass.core.engine.SearchEngineQueryParseException |
---|
4 | |
---|
5 | /* |
---|
6 | * Copyright 2007 the original author or authors. |
---|
7 | * |
---|
8 | * Licensed under the Apache License, Version 2.0 (the "License"); |
---|
9 | * you may not use this file except in compliance with the License. |
---|
10 | * You may obtain a copy of the License at |
---|
11 | * |
---|
12 | * http://www.apache.org/licenses/LICENSE-2.0 |
---|
13 | * |
---|
14 | * Unless required by applicable law or agreed to in writing, software |
---|
15 | * distributed under the License is distributed on an "AS IS" BASIS, |
---|
16 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
---|
17 | * See the License for the specific language governing permissions and |
---|
18 | * limitations under the License. |
---|
19 | */ |
---|
20 | |
---|
21 | |
---|
22 | /** |
---|
23 | * Basic web interface for Grails Searchable Plugin |
---|
24 | * |
---|
25 | * @author Adem and Jahn |
---|
26 | */ |
---|
27 | class QueryController { |
---|
28 | |
---|
29 | def searchableService |
---|
30 | |
---|
31 | def index = { |
---|
32 | render( view:'index' ) |
---|
33 | } |
---|
34 | |
---|
35 | |
---|
36 | def success = { |
---|
37 | try { |
---|
38 | println params |
---|
39 | render searchableService.search(params['bla'], type:"Term" ) |
---|
40 | } catch( SearchEngineQueryParseException e) { println "SEQPE: " + e } |
---|
41 | catch( Exception e) { println e } |
---|
42 | render "test" |
---|
43 | } |
---|
44 | |
---|
45 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.