-
Notifications
You must be signed in to change notification settings - Fork 33
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
Add documentation, tests #1
Comments
https://gitter.im/diesel-rs/diesel?at=586c0fce9d4cc4fc537197d9 That gitter statement and diesel-rs/diesel#88 makes it sounds like this code doesnt work? If you can give show me a working example I can try a stab at some tests. I cant seem to get it to work right now. |
I'm also interested in an example using ts_rank() and to_tsquery(). SELECT pid, p_title
FROM (SELECT post.id as pid,
post.title as p_title,
setweight(to_tsvector(post.language::regconfig, post.title), 'A') ||
setweight(to_tsvector(post.language::regconfig, post.content), 'B') ||
setweight(to_tsvector('simple', author.name), 'C') ||
setweight(to_tsvector('simple', coalesce(string_agg(tag.name, ' '))), 'B') as document
FROM post
JOIN author ON author.id = post.author_id
JOIN posts_tags ON posts_tags.post_id = posts_tags.tag_id
JOIN tag ON tag.id = posts_tags.tag_id
GROUP BY post.id, author.id) p_search
WHERE p_search.document @@ to_tsquery('english', 'Endangered & Species')
ORDER BY ts_rank(p_search.document, to_tsquery('english', 'Endangered & Species')) DESC; Btw, is it possible to do |
I'd like to try working on this issue, if that's okay! |
Go for it |
There's a README.md in #18 . |
Some examples would also be greatly appreciated! |
Please add some example for this repo. |
@jiangxiaoqiang Contributions for a improved documentation are welcome. Otherwise this is currently not something the diesel team focuses on, as this crate mainly serves as demonstration how to implement similar functionality outside of diesel. |
I'll get around to writing a blog post about my usage at some point. |
wait your blog, or could you give me a clue how to do the full text query from SO? https://stackoverflow.com/questions/73002858/how-to-using-rust-diesel-to-do-the-full-text-query |
@jiangxiaoqiang Please stop using this and similar issues for such discussions. Thats off topic here. As this has happened repeatedly, insider this as a last warning. |
#[deny(missing_docs)]
The text was updated successfully, but these errors were encountered: