Fixed index search case sensitivity, and index translation.
This commit is contained in:
parent
3ce2d99c22
commit
93d212f7e5
|
@ -3,6 +3,9 @@ export default {
|
||||||
language: 'Language',
|
language: 'Language',
|
||||||
pages: 'Pages'
|
pages: 'Pages'
|
||||||
},
|
},
|
||||||
|
indexPage: {
|
||||||
|
searchHint: 'Search for a Gym'
|
||||||
|
},
|
||||||
gymPage: {
|
gymPage: {
|
||||||
home: 'Home',
|
home: 'Home',
|
||||||
submit: 'Submit',
|
submit: 'Submit',
|
||||||
|
|
|
@ -3,6 +3,9 @@ export default {
|
||||||
language: 'Taal',
|
language: 'Taal',
|
||||||
pages: 'Pagina\'s'
|
pages: 'Pagina\'s'
|
||||||
},
|
},
|
||||||
|
indexPage: {
|
||||||
|
searchHint: 'Zoek een sportschool'
|
||||||
|
},
|
||||||
gymPage: {
|
gymPage: {
|
||||||
home: 'Thuis',
|
home: 'Thuis',
|
||||||
submit: 'Indienen',
|
submit: 'Indienen',
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
<StandardCenteredPage>
|
<StandardCenteredPage>
|
||||||
<q-input
|
<q-input
|
||||||
v-model="searchQuery"
|
v-model="searchQuery"
|
||||||
label="Search for a Gym"
|
:label="$t('indexPage.searchHint')"
|
||||||
clearable
|
clearable
|
||||||
:loading="searchBarLoadingState"
|
:loading="searchBarLoadingState"
|
||||||
@update:modelValue="onSearchQueryUpdated"
|
@update:modelValue="onSearchQueryUpdated"
|
||||||
|
@ -20,10 +20,10 @@
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
import {onMounted, ref, Ref} from 'vue';
|
import {onMounted, ref, Ref} from 'vue';
|
||||||
import SimpleGymItem from 'components/SimpleGymItem.vue';
|
|
||||||
import {useRoute, useRouter} from 'vue-router';
|
import {useRoute, useRouter} from 'vue-router';
|
||||||
import StandardCenteredPage from 'components/StandardCenteredPage.vue';
|
|
||||||
import {GymSearchResult, searchGyms} from 'src/api/gymboard-search';
|
import {GymSearchResult, searchGyms} from 'src/api/gymboard-search';
|
||||||
|
import SimpleGymItem from 'src/components/SimpleGymItem.vue';
|
||||||
|
import StandardCenteredPage from 'src/components/StandardCenteredPage.vue';
|
||||||
|
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
const router = useRouter();
|
const router = useRouter();
|
||||||
|
|
|
@ -36,7 +36,7 @@ public class GymIndexSearcher {
|
||||||
fieldWeights.put("country_name", 0.5f);
|
fieldWeights.put("country_name", 0.5f);
|
||||||
fieldWeights.put("street_address", 0.1f);
|
fieldWeights.put("street_address", 0.1f);
|
||||||
for (String term : terms) {
|
for (String term : terms) {
|
||||||
String searchTerm = term.strip() + "*";
|
String searchTerm = term.strip().toLowerCase() + "*";
|
||||||
for (var entry : fieldWeights.entrySet()) {
|
for (var entry : fieldWeights.entrySet()) {
|
||||||
Query baseQuery = new WildcardQuery(new Term(entry.getKey(), searchTerm));
|
Query baseQuery = new WildcardQuery(new Term(entry.getKey(), searchTerm));
|
||||||
queryBuilder.add(new BoostQuery(baseQuery, entry.getValue()), BooleanClause.Occur.SHOULD);
|
queryBuilder.add(new BoostQuery(baseQuery, entry.getValue()), BooleanClause.Occur.SHOULD);
|
||||||
|
|
Loading…
Reference in New Issue