MS Access:将验证字段添加到已通过电子邮件发送的记录中?(MS Access: Adding a verification field to records that have been emailed?)
我的MS Access数据库中内置了电子邮件功能,它根据等于今天的日期的时间戳查询添加的所有记录,并将它们添加到通过电子邮件发送的报告中。 这不是自动的,因为不是每天都有记录进入它,而是用户触发 - 通常是在一天结束时。
但是如果有人忘了呢?
查询可以被重写以过滤
>=Date()-1
(或者多天)的时间戳,但是我们确实不希望多次发送相同的记录。 有没有办法在查询运行时发送电子邮件时,它会标记发送的记录以便它们不再发送?I have email functionality built into my MS Access database that queries all records added based on a timestamp that equals today's date and adds them to a report which is emailed. This is not automated, as not every day has record entered into it, but user triggered - usually at the end of the day.
But what if someone forgets?
The query could be rewritten to filter the timestamp for
>=Date()-1
(or however many days), but we really don't want to send the same record more than once. Is there a way that, when the query runs to send the email, it marks the records that are sent so they aren't sent again?
原文:https://stackoverflow.com/questions/43002275
最满意答案
每个索引都会考虑Id,因此即使6个索引上的ID总数超过最大值,Lucene也不会抱怨。 但是,如果您尝试存储的数字对于所选的数据类型而言太大(例如,在整数-32类型中压缩的整数-64),则会抛出Java错误。 最佳做法是使用表示为文字的数字或甚至是ids的字母数字值。
The Id is considered for each index, so even if the total number of ids on the 6 indices will exceed the maximum, Lucene won't complain. However if you'll try to store a number too big for the datatype chosen (for instance a integer-64 squeezed in an integer-32 type), a Java error will be thrown. Best practice is to use a number represented as literal or even an alphanumeric value for your ids.
相关问答
更多-
你也可以查看ifilters - 如果你搜索asp.net ifilters,有很多资源: http://www.codeproject.com/KB/cs/IFilter.aspx http://en.wikipedia.org/wiki/IFilters http://www.ifilter.org/ https://stackoverflow.com/questions/1535992/ifilter-or-sdk-for-many-file-types 当然,如果你将它分发给客户端系统,会增加麻烦, ...
-
每个商店都应保存在不同的文档中,因此您最终会执行以下操作: for(Product product: products) { for(Store store: product.stores) { Document doc = new Document(); doc.add(new TextField("productName", product.name, Field.Store.YES)); doc.add(new FloatField("price ...
-
Lucene评分函数(Lucene Scoring function)[2021-12-17]
我想出了如何完成工作,我使用了CustomScoreProvider类,并得到了我想要的结果 class CustomizedScoreProvider extends CustomScoreProvider { public CustomizedScoreProvider(LeafReaderContext reader) { super(reader); // TODO Auto-generated constructor stub ... -
我相信你的猜测是正确的,如果按照doc id顺序排序,它不需要对每个匹配的文档进行评分,但是一旦找到足够匹配的文档就可以短路,而不是每个文档需要的分数排序。得分知道哪些是最好的比赛。 看起来你应该问的问题是,为什么要花这么长时间才能进行搜索呢? 根据你所写的内容,我想我可以猜到:你不应该使用KeywordAnalyzer来获取全文。 听起来你正在将全文索引为关键字,然后搜索句子,可能使用双通配符,或正则表达式,或类似的东西。 别那样做。 你可能只是忘记了Lucene,编写了一个很好的老式顺序搜索,因为这就是 ...
-
只需创建一个按文档ID按逆序排序的排序。 Sort sort = new Sort( new SortField( null, // or specify a field SortField.Type.DOC, true ) ); 然后搜索top,err,bottom 10K docs: indexSearcher.search(query, 10000); Just create a sort which sort ...
-
Lucene搜索结果(Lucene search result)[2022-07-08]
您可以使用WildCardQuery ,因为单词expense包含在所有四个文档中,因此您可以将搜索字符串作为*expense*传递,这将返回name字段中具有费用的所有文档。 不要忘记设置QueryParser以允许带有以下内容的前导通配符: QueryParser.setAllowLeadingWildcard(true) 在代码中进行以下更改: nameQParser.setAllowLeadingWildcard(true); Query query = nameQParser.parse("*e ... -
获取Lucene的Doc ID(Getting the Doc ID in Lucene)[2023-11-28]
事实证明你必须这样做: var hits = searcher.Search(query); var result = hits.Id(0); 相反 var results = hits.Doc(i); var docid = results.<...> //there's nothing I could find there to do this Turns out you have to do this: var hits = searcher.Search(query); var result = ... -
每个索引都会考虑Id,因此即使6个索引上的ID总数超过最大值,Lucene也不会抱怨。 但是,如果您尝试存储的数字对于所选的数据类型而言太大(例如,在整数-32类型中压缩的整数-64),则会抛出Java错误。 最佳做法是使用表示为文字的数字或甚至是ids的字母数字值。 The Id is considered for each index, so even if the total number of ids on the 6 indices will exceed the maximum, Lucene ...
-
如何使用lucene进行搜索(How to use lucene to search)[2022-12-21]
分析器旨在将字符串拆分为标记。 SmartChineseAnalyzer将“和试天下”分为“和”,“试”和“天下”,就像StandardAnalyzer将“谁获得世界”分为“谁”,“获取”和“世界”一样。 如果你想搜索一个短语,你的查询应该引用: qp.parse("\"且试天下\""); 如果您不希望分析该字段,请将其索引为StringField (或使用KeywordAnalyzer )。 Analyzers are intended to split strings into tokens. The ... -
几个小时后,终于找到了解决方案。 我发现lucene不允许访问它的内部文档ID,但是我们可以遍历文档并获取它们的TermVector 。 这似乎是我们可以用来获得术语向量的唯一可能方式。 我使用下面的代码: QueryParser parser = new QueryParser("Body", new EnglishAnalyzer()); Query query = parser.parse(topic); TopDocs hits = iSearcher.search(query, 1000); fo ...