Browse Source

fixed elastic

main
matthew 2 years ago
parent
commit
ad5c9833e6
  1. 28
      searching-front/app/core/components/WebsiteCard/WebsiteCard.tsx
  2. 2
      searching-front/services/modules/elastic/index.ts

28
searching-front/app/core/components/WebsiteCard/WebsiteCard.tsx

@ -1,17 +1,23 @@
import { cleanUrlForUi } from 'app/core/helpers/common';
import s from './styles.module.css'
import { cleanUrlForUi } from "app/core/helpers/common"
import s from "./styles.module.css"
interface Props {
url: string;
title: string;
description: string;
url: string
title: string
description: string
}
const WebsiteCard = (props:Props) => {
return <div className={s.root}>
<a className={s.titleLink} href={props.url}>{props.title}</a>
<a className={s.miniLink} href={props.url}>{cleanUrlForUi(props.url)}</a>
<div className={s.description}>{props.description}</div>
const WebsiteCard = (props: Props) => {
return (
<div className={s.root}>
<a target="_blank" className={s.titleLink} href={props.url}>
{props.title}
</a>
<a target="_blank" className={s.miniLink} href={props.url}>
{cleanUrlForUi(props.url)}
</a>
<div className={s.description}>{props.description}</div>
</div>
)
}
export default WebsiteCard;
export default WebsiteCard

2
searching-front/services/modules/elastic/index.ts

@ -125,7 +125,7 @@ class Elastic {
query: {
multi_match: {
query: text,
fields: ["title^4", "description^3", "h1^2", "bodyText"],
fields: ["title^4"],
},
},
})

Loading…
Cancel
Save