Skip to content
This repository has been archived by the owner on Oct 13, 2021. It is now read-only.

Latest commit

 

History

History
23 lines (22 loc) · 578 Bytes

logic.md

File metadata and controls

23 lines (22 loc) · 578 Bytes

logic search

docs := searcher.Search(types.SearchReq{
		Text: "google testing",
		// Search "google testing" segmentation `or relation` 
		// and not the result of "accidentally"
        // 搜索 "google testing" 分词 `或关系` 并且不是 "accidentally" 的结果
		Logic: types.Logic{
			Should: true,
			// LogicExpr: types.LogicExpr{
			// 	NotInLabels: "accidentally",
			// },
			Expr: types.Expr{
				NotIn: "accidentally",
			},
        },
        // 0 to 100 of the results
		RankOpts: &types.RankOpts{
			OutputOffset: 0,
			MaxOutputs:   100,
		}})