English 中文(简体)
找到存在类似问题的理由
原标题:Script to find if a similar question exists

Gday,

I m 创建FAQ系统,用户需要能够看到是否提出了类似的问题。 她想知道是否有任何人知道有某种大赦国际的文字(最好或可能的行动说明)? 我在一次问题被打上了记号,相关问题在下。

任何建议都会得到赞赏。

谢谢大家。

最佳回答

我认为,大家最希望的是建立一个简单的搜索引擎:将问题分成几个字,在rd中记录对问题的言辞。

表问题(同上,案文......)

表格(问题_id,字数)

接着提出与新问题类似的问题,费用为:

SELECT prev.id, prev.text, count(*) AS common_words
FROM questions prev, words prev_words, words curr_words
WHERE curr_words.question_id=$x 
AND curr_words.word=prev_words.word
AND prev_words.question_id=prev.id
GROUP BY id, text
ORDER BY COUNT(*) DESC
LIMIT.....?

你当然可以更详尽地比较返还的短名单,但这当然应当是第一步。

C. 出席情况

问题回答

如果不了解贵国数据库所看的是什么(假定你有)或贵国网站是如何运作的,这个问题就很容易回答。

你们可以把许多事情作为基础:

  1. Share a common category
  2. Share common tags
  3. Share common keywords within their body
    These keywords are often determined after common-words ( and , is , the , it , etc...) are stripped from the string, leaving uncommon words ( C# , database , questions ) to perform lookups with.
  4. Users explicitly declared them similar
  5. etc...

这些是你在确定相似性时应考虑的所有类型的项目。 我希望这一帮助! 将来返回时要得到更具体的答复。





相关问题
selected text in iframe

How to get a selected text inside a iframe. I my page i m having a iframe which is editable true. So how can i get the selected text in that iframe.

How to fire event handlers on the link using javascript

I would like to click a link in my page using javascript. I would like to Fire event handlers on the link without navigating. How can this be done? This has to work both in firefox and Internet ...

How to Add script codes before the </body> tag ASP.NET

Heres the problem, In Masterpage, the google analytics code were pasted before the end of body tag. In ASPX page, I need to generate a script (google addItem tracker) using codebehind ClientScript ...

Clipboard access using Javascript - sans Flash?

Is there a reliable way to access the client machine s clipboard using Javascript? I continue to run into permissions issues when attempting to do this. How does Google Docs do this? Do they use ...

javascript debugging question

I have a large javascript which I didn t write but I need to use it and I m slowely going trough it trying to figure out what does it do and how, I m using alert to print out what it does but now I ...

Parsing date like twitter

I ve made a little forum and I want parse the date on newest posts like twitter, you know "posted 40 minutes ago ","posted 1 hour ago"... What s the best way ? Thanx.

热门标签