tagging

How do i implement tag searching? with lucene?

狂风中的少年 提交于 2019-12-17 17:41:14
问题 I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. If i shouldnt use lucene what should i use? As am example say there are items tagged like this apples carrots apples carrots apple banana if a user search apples i dont care if there is any preference from 1,2 and 4. However i seen many forums do this which i HATED is when a user search apple carrots 2 and 3 have high results while 1 is hard to find even though it matches my search more closely.

Tagging of names using lucene/java

自古美人都是妖i 提交于 2019-12-13 16:26:52
问题 I have names of all the employees of my company (5000+). I want to write an engine which can on the fly find names in online articles(blogs/wikis/help documents) and tag them with "mailto" tag with the users email. As of now I am planning to remove all the stop words from the article and then search for each word in a lucene index. But even in that case I see a lot of queries hitting the indexes, for example if there is an article with 2000 words and only two references to people names then

Rest api - adding tags to an entity

允我心安 提交于 2019-12-13 07:03:55
问题 I am designing a rest api in which I need to add tags to an entity. The entity is created using POST /content where the json data is passed in the request body. I want to allow adding tags while the POST request is being made, and also later on. This is what I have. POST /content?tag=foo&tag=bar PUT /content/{id}?tag=baz&tag=bat Now, how do I allow deleting tags? What would be a better approach> 回答1: Short answer: is you would do it like this Assuming your entity is the content in your to

Need help with sql query to find things with most specified tags

前提是你 提交于 2019-12-13 00:21:53
问题 Let's say I have the following tables: TAGS id: integer name: string POSTS id: integer body: text TAGGINGS id: integer tag_id: integer post_id: integer How would I go about writing a query that selects all posts in order of the post containing the highest number of the following tags (name attribute of tags table): "Cheese", "Wine", "Paris", "Frace", "City", "Scenic", "Art" See also: Need help with sql query to find things tagged with all specified tags (note: similar, but not a duplicate!)

nested insert in mysql for tagging

喜欢而已 提交于 2019-12-12 13:59:54
问题 i'd like to add a tag to a blogpost with a single sql statement. say my tables would look as follows: tags +-------+-----------+ | tagid | tag | +-------+-----------+ | 1 | news | | 2 | top-story | +-------+-----------+ tag2post +----+--------+-------+ | id | postid | tagid | +----+--------+-------+ | 0 | 322 | 1 | +----+--------+-------+ the problem i'd like to solve is inserting a new tag , retrieve it's id and then inset this new id into the relation table in a single sql statement. INSERT

Any distributed cache systems that allows for tagging content?

旧时模样 提交于 2019-12-12 11:10:11
问题 I'd like to know if there is any distributed cache systems like memcached, velocity or sharedcache that allows me to tag content with more than just it's name, or that can relate items to eachother, so if i invalidate the cache for one item it also invalidates the related items too. eg. if i have two pages that reference the same data and that data changes, i'd like the cache for the two referencing pages to invalidate. or is this an addition to one of those projects begging to be developed?

Tagging from Scratch: the Querying Database issue

霸气de小男生 提交于 2019-12-12 04:33:59
问题 @saverio was successful on answer this database query question on Tagging from Scratch: the Tag Cloud Issue Now I'm trying to connect the tagging system with the jQuery-tokenInput to Create and Find tags dynamically as on http://railscasts.com/episodes/258-token-fields-revised. My guess is that is a Query problem to the Posgresql Database. I've got Postgresql correctly installed jQuery-tokenInput is on its place on Application.js //= require jquery.tokeninput Somehow it can load the tags from

retrieving tags from result of POS tagging

拥有回忆 提交于 2019-12-12 02:33:59
问题 Using python how to retrieve only the tags - 'NN', 'JJ' etc from ('[', 'NN'), ("u'Tradus-Under", 'NN'), ("'", "''"), (',', ','), ("u'Maintenance", 'JJ'), ("'", "''"), (']', ':') ie. from POS tagging result. 回答1: Assuming those elements are in a list (I call that list lst ): import string lst = [ ('[', 'NN'), ("u'Tradus-Under", 'NN'), ("'", "''"), (',', ','), ("u'Maintenance", 'JJ'), ("'", "''"), (']', ':') ] tags = [] for _,poss_tag in lst: if(len(poss_tag) == 2 and poss_tag[0] == poss_tag[1]

ActiveRecord::Relation issue on acts-as-taggable-on

孤者浪人 提交于 2019-12-10 12:17:14
问题 I am a rails newbie. I am trying to implement acts-as-taggable-on on my sample app. I am able to enter multiple tags using tag_list but facing issues searching them. This is what I got. I used scaffold User to generate the controller & model. class CreateUsers < ActiveRecord::Migration def change create_table :users do |t| t.string :name t.text :tags t.timestamps end end end My User Model is class User < ActiveRecord::Base serialize :tags acts_as_taggable_on :tags scope :by_join_date, order(

SVN-ANT copy task doesn't work, svn copy from CLI does, same arguments

。_饼干妹妹 提交于 2019-12-10 10:48:14
问题 I am using SVN ANT version 1.3.1, ANT 1.7.1, Java 1.6u, and the SVN repo is 1.6 (I think - the prod\db\format file says "4".) I have two SVN targets (I wonder if the "commit" task isn't completing before the "copy" task attempts to execute, which is why I will quote it as part of my build.xml.) I am attempting to tag a release as a production version (seems like a fairly common task for an ANT build relying on SVN-ANT, right?) I can do the following on the command line: svn copy http:/