-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WIP: Initial work to extract examples from the FOSDEM15 talk #32
base: master
Are you sure you want to change the base?
WIP: Initial work to extract examples from the FOSDEM15 talk #32
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like a good start, just a few minor suggestions.
content/docs/Query.md
Outdated
|
||
q := bleve.NewTermQuery("golden") | ||
req := bleve.NewSearchRequest(q) | ||
req.Highlight = bleve.NewHighlightWithStyle("html") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm thinking that to keep these examples short and focused on how to use the query type being discussed, we should remove the lines which set req.Highlight
.
content/docs/Query.md
Outdated
q := bleve.NewTermQuery("golden") | ||
req := bleve.NewSearchRequest(q) | ||
req.Highlight = bleve.NewHighlightWithStyle("html") | ||
req.Fields = []string{"discription"} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And same for req.Fields
, it isn't required for this example and might confuse users about whether it is required or not.
content/docs/Query.md
Outdated
log.Fatal(err) | ||
} | ||
|
||
fq := bleve.NewFuzzyQuery("Citrus") // HLBLEVE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should remove the comment // HLBLEVE
that was added to highlight the line in a particular way in the presentation.
Thanks for the input. As I work through this I'm wondering if more targeted examples with just the lines relevant to the query being discussed would be better. Rather than show a complete working program which gets quite repetitive and verbose, we would just show: tq1 := bleve.NewTermQuery("golden")
tq2 := bleve.NewTermQuery("Citrus")
q := bleve.NewConjunctionQuery([]bleve.Query{tq1, tq2})
req := bleve.NewSearchRequest(q) I'm thinking a better place for the more complete examples would be in an Thoughts? |
Maybe we have one complete example at the top, featuring MatchQuery since it is the most common. Then all the others just show the relevant lines that would be different for that type of query? |
Per the discussion in #31 here is the beginnings of work to add examples to the docs