示例#1
0
        private Lucene.Net.Search.BooleanQuery QueryOperator(QueryLogic logic, Lucene.Net.Search.Query curQuery, Lucene.Net.Search.BooleanQuery targetQuery)
        {
            switch (logic)
            {
                case QueryLogic.MUST:
                    targetQuery = targetQuery.Must(curQuery);
                    break;
                case QueryLogic.SHOULD:
                    targetQuery = targetQuery.Should(curQuery);
                    break;
                case QueryLogic.MUST_NOT:
                    targetQuery = targetQuery.MustNot(curQuery);
                    break;
                default:
                    break;
            }

            return targetQuery;
        }