Newer
Older
<ul class="hits">
<Preview v-for="(result, index) in hits" :key="index" :searchHit="result" @click.native="article_link_click(result._source)">
</Preview>
</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(article) {
this.$router.push('' + article.article_id)
this.$emit('search-hit-click', article)
},
components: {
Preview