Browse Source

fixed elastic

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

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

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

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

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

Loading…
Cancel
Save