Newer
Older
<Preview v-for="(result, index) in hits" :key="index" :searchHit="result" @click.native="article_link_click(result)">
</template>
<script>
import helpers from '../utils/helpers.js'
import Preview from './Preview.vue'
},
computed: {
extended_results: function(){
return this.hits.map(
function(hit){
return {
id: hit._id,
label: hit._source.lemmas.map(x => x.lemma).join(', '),
classification: helpers.group_list(hit._source.lemmas),
article: hit._source
article_link_click: function(result) {
this.$router.push('/' + result._index + '/' + result._id)
this.$emit('search-hit-click', result._source)
},
components: {
Preview