Review Request 125098: Fix date string when porting to QDate

2015-09-07 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125098/
---

Review request for Baloo and Vishesh Handa.


Repository: baloo


Description
---

QDate doesn't require "%" to format date, and "%Y" equilvalent is .


Diffs
-

  src/kioslaves/timeline/kio_timeline.cpp eb8940b 

Diff: https://git.reviewboard.kde.org/r/125098/diff/


Testing
---

It was "%January %15" in dolphin, now it's "January 2015".


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125098: Fix date string displayed in timeline:/ address bar due to porting to QDate

2015-09-07 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125098/
---

(Updated Sept. 8, 2015, 12:13 a.m.)


Review request for Baloo and Vishesh Handa.


Summary (updated)
-

Fix date string displayed in timeline:/ address bar due to porting to QDate


Repository: baloo


Description
---

QDate doesn't require "%" to format date, and "%Y" equilvalent is .


Diffs
-

  src/kioslaves/timeline/kio_timeline.cpp eb8940b 

Diff: https://git.reviewboard.kde.org/r/125098/diff/


Testing
---

It was "%January %15" in dolphin, now it's "January 2015".


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125098: Fix date string displayed in timeline:/ address bar due to porting to QDate

2015-09-08 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125098/
---

(Updated Sept. 8, 2015, 2:32 p.m.)


Status
--

This change has been marked as submitted.


Review request for Baloo and Vishesh Handa.


Changes
---

Submitted with commit 2b08a88c61bf114b1f327fc922c8923a3d01cd1a by Weng Xuetian 
to branch master.


Repository: baloo


Description
---

QDate doesn't require "%" to format date, and "%Y" equilvalent is .


Diffs
-

  src/kioslaves/timeline/kio_timeline.cpp eb8940b 

Diff: https://git.reviewboard.kde.org/r/125098/diff/


Testing
---

It was "%January %15" in dolphin, now it's "January 2015".


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-07 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/
---

Review request for Baloo and Vishesh Handa.


Repository: baloo


Description
---

The bug is obvious, old code uses limit instead of (limit > 0), which 
gracefully handles limit < 0 case (means everything).

After offset is introduced, limit < 0 case is not handled properly.

This patch contains following changes:
1. make offset uint, m_offset is uint in Query already.
2. handle limit < 0 case properly.


Diffs
-

  src/lib/searchstore.h 17b4263 
  src/lib/searchstore.cpp a2e7749 

Diff: https://git.reviewboard.kde.org/r/125544/diff/


Testing
---

baloosearch:/ doesn't return anything because of this, now it properly returns 
result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng


> On Oct. 9, 2015, 11:49 a.m., Emmanuel Pescosta wrote:
> > Should fix bug 348902 :)

I don't think it's the same bug. The bug that I tries to fixed here is 
introduced between 5.14 - 5.15.


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/#review86541
---


On Oct. 9, 2015, 11:21 a.m., Xuetian Weng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125544/
> ---
> 
> (Updated Oct. 9, 2015, 11:21 a.m.)
> 
> 
> Review request for Baloo, Release Team and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> ---
> 
> The bug is obvious, old code uses limit instead of (limit > 0), which 
> gracefully handles limit < 0 case (means everything).
> 
> After offset is introduced, limit < 0 case is not handled properly.
> 
> This patch contains following changes:
> 1. make offset uint, m_offset is uint in Query already.
> 2. handle limit < 0 case properly.
> 
> 
> Diffs
> -
> 
>   src/lib/searchstore.h 17b4263 
>   src/lib/searchstore.cpp a2e7749 
> 
> Diff: https://git.reviewboard.kde.org/r/125544/diff/
> 
> 
> Testing
> ---
> 
> baloosearch:/ doesn't return anything because of this, now it properly 
> returns result.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng


> On Oct. 9, 2015, 11:21 a.m., Vishesh Handa wrote:
> > src/lib/searchstore.cpp, line 114
> > <https://git.reviewboard.kde.org/r/125544/diff/1/?file=410212#file410212line114>
> >
> > The entire code in this else case is absolutely rubbish. The person 
> > implementing it should feel bad (me).
> > 
> > We seem to be completly ignoring the offset over here.

Ah, you're right..


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/#review86535
-------


On Oct. 9, 2015, 11:21 a.m., Xuetian Weng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125544/
> ---
> 
> (Updated Oct. 9, 2015, 11:21 a.m.)
> 
> 
> Review request for Baloo, Release Team and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> ---
> 
> The bug is obvious, old code uses limit instead of (limit > 0), which 
> gracefully handles limit < 0 case (means everything).
> 
> After offset is introduced, limit < 0 case is not handled properly.
> 
> This patch contains following changes:
> 1. make offset uint, m_offset is uint in Query already.
> 2. handle limit < 0 case properly.
> 
> 
> Diffs
> -
> 
>   src/lib/searchstore.h 17b4263 
>   src/lib/searchstore.cpp a2e7749 
> 
> Diff: https://git.reviewboard.kde.org/r/125544/diff/
> 
> 
> Testing
> ---
> 
> baloosearch:/ doesn't return anything because of this, now it properly 
> returns result.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng


> On Oct. 9, 2015, 11:21 a.m., Vishesh Handa wrote:
> > src/lib/searchstore.cpp, line 103
> > <https://git.reviewboard.kde.org/r/125544/diff/1/?file=410212#file410212line103>
> >
> > Say we have 50 results
> > 
> > limit = 10
> > offset = 5
> > 
> > So we want results from [5, 14]
> > 
> > With this code -
> > for (i = 5; i < 10; i++)
> > 
> > We we would get [5, 10). Could you please fix this? I think a simple `i 
> > < limit + offset` would do.

I just want to confirm, do we want [offset, offset + limit), or [offset, 
limit), otherwise the semantics of sort looks problematic.

Currently the sort is always applied to [0, limit), if we want [offset, offset 
+ limit), shouldn't we always sort the whole set, and then slice [offset, 
offset + limit)?


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/#review86535
---


On Oct. 9, 2015, 11:21 a.m., Xuetian Weng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125544/
> ---
> 
> (Updated Oct. 9, 2015, 11:21 a.m.)
> 
> 
> Review request for Baloo, Release Team and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> ---
> 
> The bug is obvious, old code uses limit instead of (limit > 0), which 
> gracefully handles limit < 0 case (means everything).
> 
> After offset is introduced, limit < 0 case is not handled properly.
> 
> This patch contains following changes:
> 1. make offset uint, m_offset is uint in Query already.
> 2. handle limit < 0 case properly.
> 
> 
> Diffs
> -
> 
>   src/lib/searchstore.h 17b4263 
>   src/lib/searchstore.cpp a2e7749 
> 
> Diff: https://git.reviewboard.kde.org/r/125544/diff/
> 
> 
> Testing
> ---
> 
> baloosearch:/ doesn't return anything because of this, now it properly 
> returns result.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng


> On Oct. 9, 2015, 11:21 a.m., Vishesh Handa wrote:
> > src/lib/searchstore.cpp, line 103
> > <https://git.reviewboard.kde.org/r/125544/diff/1/?file=410212#file410212line103>
> >
> > Say we have 50 results
> > 
> > limit = 10
> > offset = 5
> > 
> > So we want results from [5, 14]
> > 
> > With this code -
> > for (i = 5; i < 10; i++)
> > 
> > We we would get [5, 10). Could you please fix this? I think a simple `i 
> > < limit + offset` would do.
> 
> Xuetian Weng wrote:
> I just want to confirm, do we want [offset, offset + limit), or [offset, 
> limit), otherwise the semantics of sort looks problematic.
> 
> Currently the sort is always applied to [0, limit), if we want [offset, 
> offset + limit), shouldn't we always sort the whole set, and then slice 
> [offset, offset + limit)?

For SQL, the query with ORDER BY will sort first, then slice the needed part of 
data.


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/#review86535
---


On Oct. 9, 2015, 11:21 a.m., Xuetian Weng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/125544/
> ---
> 
> (Updated Oct. 9, 2015, 11:21 a.m.)
> 
> 
> Review request for Baloo, Release Team and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> ---
> 
> The bug is obvious, old code uses limit instead of (limit > 0), which 
> gracefully handles limit < 0 case (means everything).
> 
> After offset is introduced, limit < 0 case is not handled properly.
> 
> This patch contains following changes:
> 1. make offset uint, m_offset is uint in Query already.
> 2. handle limit < 0 case properly.
> 
> 
> Diffs
> -
> 
>   src/lib/searchstore.h 17b4263 
>   src/lib/searchstore.cpp a2e7749 
> 
> Diff: https://git.reviewboard.kde.org/r/125544/diff/
> 
> 
> Testing
> ---
> 
> baloosearch:/ doesn't return anything because of this, now it properly 
> returns result.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/
---

(Updated Oct. 9, 2015, 5:47 p.m.)


Review request for Baloo, Release Team and Vishesh Handa.


Changes
---

1. Always sort whole resultIds, then pick [offset, offset + limit) from it.
2. Consider offset when no sort is required.


Repository: baloo


Description
---

The bug is obvious, old code uses limit instead of (limit > 0), which 
gracefully handles limit < 0 case (means everything).

After offset is introduced, limit < 0 case is not handled properly.

This patch contains following changes:
1. make offset uint, m_offset is uint in Query already.
2. handle limit < 0 case properly.


Diffs (updated)
-

  src/lib/searchstore.h 17b4263 
  src/lib/searchstore.cpp a2e7749 

Diff: https://git.reviewboard.kde.org/r/125544/diff/


Testing
---

baloosearch:/ doesn't return anything because of this, now it properly returns 
result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/
---

(Updated Oct. 9, 2015, 5:54 p.m.)


Review request for Baloo, Release Team and Vishesh Handa.


Repository: baloo


Description (updated)
---

The bug is obvious, old code uses limit instead of (limit > 0), which 
gracefully handles limit < 0 case (means everything).

After offset is introduced, limit < 0 case is not handled properly.

This patch contains following changes:
1. make offset uint, m_offset is uint in Query already.
2. handle limit < 0 case properly.

Also fix offset with sorting.


Diffs
-

  src/lib/searchstore.h 17b4263 
  src/lib/searchstore.cpp a2e7749 

Diff: https://git.reviewboard.kde.org/r/125544/diff/


Testing (updated)
---

baloosearch:/ doesn't return anything because of this, now it properly returns 
result.

Play with baloosearch command a little bit, offset and limit returns the 
[offset, offset + limit) and no crash on the border case.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 125544: Fix limit/offset handling when sort option is no sort.

2015-10-09 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/125544/
---

(Updated Oct. 9, 2015, 6:57 p.m.)


Status
--

This change has been marked as submitted.


Review request for Baloo, Release Team and Vishesh Handa.


Changes
---

Submitted with commit 64c57e56fe3392cf057ac2948cddb1e5a011a0c1 by Weng Xuetian 
to branch master.


Repository: baloo


Description
---

The bug is obvious, old code uses limit instead of (limit > 0), which 
gracefully handles limit < 0 case (means everything).

After offset is introduced, limit < 0 case is not handled properly.

This patch contains following changes:
1. make offset uint, m_offset is uint in Query already.
2. handle limit < 0 case properly.

Also fix offset with sorting.


Diffs
-

  src/lib/searchstore.h 17b4263 
  src/lib/searchstore.cpp a2e7749 

Diff: https://git.reviewboard.kde.org/r/125544/diff/


Testing
---

baloosearch:/ doesn't return anything because of this, now it properly returns 
result.

Play with baloosearch command a little bit, offset and limit returns the 
[offset, offset + limit) and no crash on the border case.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Review Request 126132: Better bitrate format in filemetadatawidget

2015-11-21 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126132/
---

Review request for Baloo and Vishesh Handa.


Repository: baloo-widgets


Description
---

Bitrate can be better formatted.

Now it's either a strange double number (3.00594e+06), or a long integer 
(32).


Diffs
-

  src/widgetfactory.cpp 7151952 

Diff: https://git.reviewboard.kde.org/r/126132/diff/


Testing
---

Now 3.00594e+06 is displayed as 3.0 MB/s. 
32 is displayed as 320 kB/s.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126132: Better bitrate format in filemetadatawidget

2015-11-24 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126132/
---

(Updated Nov. 24, 2015, 5:12 p.m.)


Status
--

This change has been marked as submitted.


Review request for Baloo and Vishesh Handa.


Changes
---

Submitted with commit 1332cf561f00c58ca0220fbb948ce79043a09dc4 by Weng Xuetian 
to branch master.


Repository: baloo-widgets


Description
---

Bitrate can be better formatted.

Now it's either a strange double number (3.00594e+06), or a long integer 
(32).


Diffs
-

  src/widgetfactory.cpp 7151952 

Diff: https://git.reviewboard.kde.org/r/126132/diff/


Testing
---

Now 3.00594e+06 is displayed as 3.0 MB/s. 
32 is displayed as 320 kB/s.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Review Request 126223: Fix date filter used by timeline:/

2015-12-02 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126223/
---

Review request for Baloo and Vishesh Handa.


Repository: baloo


Description
---

timeline:/ doesn't return correct result for month 1 or day 1, this is because 
date filter always takes 1 as whole month or whole year. 0 should be used in 
such case.


Diffs
-

  src/lib/searchstore.cpp 11fbd3f 

Diff: https://git.reviewboard.kde.org/r/126223/diff/


Testing
---

timeline://2015-12/2015-12-01 now returns correct result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126223: Fix date filter used by timeline:/

2015-12-02 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126223/
---

(Updated Dec. 2, 2015, 6:42 p.m.)


Review request for Baloo and Vishesh Handa.


Changes
---

oops, pass valid day and month to startDate.


Repository: baloo


Description
---

timeline:/ doesn't return correct result for month 1 or day 1, this is because 
date filter always takes 1 as whole month or whole year. 0 should be used in 
such case.


Diffs (updated)
-

  src/lib/searchstore.cpp 11fbd3f 

Diff: https://git.reviewboard.kde.org/r/126223/diff/


Testing
---

timeline://2015-12/2015-12-01 now returns correct result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Review Request 126227: Fix incomplete or duplicate search result with mtime

2015-12-02 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126227/
---

Review request for Baloo and Vishesh Handa.


Repository: baloo


Description
---

Test with
- baloosearch 'modified=>...' -d $HOME
- baloosearch 'modified=>...'

This two queries should return same result since I only index home folder. But 
they are not, because result from mtimedb is not sorted.

In some other rare case (On my machine, regularly happens to torrent downloaded 
files), it could also return duplicate result. not sure if this should be 
considered as a indexer bug.

Sort and remove duplication from the result in VectorPostingIterator when 
requesting first result with next().


Diffs
-

  src/engine/vectorpostingiterator.cpp 777b7fd 

Diff: https://git.reviewboard.kde.org/r/126227/diff/


Testing
---

No more duplicate result or missing result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126223: Fix date filter used by timeline:/

2015-12-05 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126223/
---

(Updated Dec. 6, 2015, 5:18 a.m.)


Status
--

This change has been marked as submitted.


Review request for Baloo and Vishesh Handa.


Changes
---

Submitted with commit 2813599eadfedeabd34569cbeb1d8de76adcb9cc by Weng Xuetian 
to branch master.


Repository: baloo


Description
---

timeline:/ doesn't return correct result for month 1 or day 1, this is because 
date filter always takes 1 as whole month or whole year. 0 should be used in 
such case.


Diffs
-

  src/lib/searchstore.cpp 11fbd3f 

Diff: https://git.reviewboard.kde.org/r/126223/diff/


Testing
---

timeline://2015-12/2015-12-01 now returns correct result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126227: Fix incomplete or duplicate search result with mtime

2015-12-05 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126227/
---

(Updated Dec. 6, 2015, 5:29 a.m.)


Review request for Baloo and Vishesh Handa.


Changes
---

Move the sort and unique call to mtimedb


Repository: baloo


Description
---

Test with
- baloosearch 'modified=>...' -d $HOME
- baloosearch 'modified=>...'

This two queries should return same result since I only index home folder. But 
they are not, because result from mtimedb is not sorted.

In some other rare case (On my machine, regularly happens to torrent downloaded 
files), it could also return duplicate result. not sure if this should be 
considered as a indexer bug.

Sort and remove duplication from the result in VectorPostingIterator when 
requesting first result with next().


Diffs (updated)
-

  src/engine/mtimedb.cpp f7283b5 

Diff: https://git.reviewboard.kde.org/r/126227/diff/


Testing
---

No more duplicate result or missing result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126227: Fix incomplete or duplicate search result with mtime

2015-12-06 Thread Xuetian Weng


> On Dec. 6, 2015, 11:47 a.m., Vishesh Handa wrote:
> > src/engine/mtimedb.cpp, line 98
> > <https://git.reviewboard.kde.org/r/126227/diff/2/?file=421133#file421133line98>
> >
> > Could you please sort these values as well? This is possible why we are 
> > getting duplicates. The WriteTransaction assumes the data is sorted when it 
> > gets it.

MtimeDB uses mtime as key, it's fairly easy to make mtimedb contain multiple 
mtime for the same docId. I don't see WriteTransaction uses MtimeDB::get.

If you want to reproduce the problem, just find a file on the day A other than 
today and confirm timeline:// can show it. Then touch the file, and then you 
can find that file in both timeline:/ today and day A.


- Xuetian


---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126227/#review89170
-------


On Dec. 6, 2015, 5:29 a.m., Xuetian Weng wrote:
> 
> ---
> This is an automatically generated e-mail. To reply, visit:
> https://git.reviewboard.kde.org/r/126227/
> ---
> 
> (Updated Dec. 6, 2015, 5:29 a.m.)
> 
> 
> Review request for Baloo and Vishesh Handa.
> 
> 
> Repository: baloo
> 
> 
> Description
> ---
> 
> Test with
> - baloosearch 'modified=>...' -d $HOME
> - baloosearch 'modified=>...'
> 
> This two queries should return same result since I only index home folder. 
> But they are not, because result from mtimedb is not sorted.
> 
> In some other rare case (On my machine, regularly happens to torrent 
> downloaded files), it could also return duplicate result. not sure if this 
> should be considered as a indexer bug.
> 
> Sort and remove duplication from the result in VectorPostingIterator when 
> requesting first result with next().
> 
> 
> Diffs
> -
> 
>   src/engine/mtimedb.cpp f7283b5 
> 
> Diff: https://git.reviewboard.kde.org/r/126227/diff/
> 
> 
> Testing
> ---
> 
> No more duplicate result or missing result.
> 
> 
> Thanks,
> 
> Xuetian Weng
> 
>


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126227: Fix incomplete or duplicate search result with mtime

2015-12-06 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126227/
---

(Updated Dec. 6, 2015, 6:03 p.m.)


Review request for Baloo and Vishesh Handa.


Changes
---

Test added.

During adding autotest two additional bugs are found.

::get() should use quint32 as parameter, otherwise on some endianness the 
result is wrong since it's using high bit of mtime.
::get() also doesn't get result correctly. Actually it's just read the first 
key instead of the searched key. SET_RANGE should be used instead of NEXT.


Repository: baloo


Description
---

Test with
- baloosearch 'modified=>...' -d $HOME
- baloosearch 'modified=>...'

This two queries should return same result since I only index home folder. But 
they are not, because result from mtimedb is not sorted.

In some other rare case (On my machine, regularly happens to torrent downloaded 
files), it could also return duplicate result. not sure if this should be 
considered as a indexer bug.

Sort and remove duplication from the result in VectorPostingIterator when 
requesting first result with next().


Diffs (updated)
-

  autotests/unit/engine/mtimedbtest.cpp e38022d 
  src/engine/mtimedb.h 1dc1cb9 
  src/engine/mtimedb.cpp f7283b5 

Diff: https://git.reviewboard.kde.org/r/126227/diff/


Testing
---

No more duplicate result or missing result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<


Re: Review Request 126227: Fix incomplete or duplicate search result with mtime

2015-12-14 Thread Xuetian Weng

---
This is an automatically generated e-mail. To reply, visit:
https://git.reviewboard.kde.org/r/126227/
---

(Updated Dec. 15, 2015, 5:28 a.m.)


Status
--

This change has been marked as submitted.


Review request for Baloo and Vishesh Handa.


Changes
---

Submitted with commit 83fda1c75ff1a6b73b582e2bd05bfb9c70b49afa by Weng Xuetian 
to branch master.


Repository: baloo


Description
---

Test with
- baloosearch 'modified=>...' -d $HOME
- baloosearch 'modified=>...'

This two queries should return same result since I only index home folder. But 
they are not, because result from mtimedb is not sorted.

In some other rare case (On my machine, regularly happens to torrent downloaded 
files), it could also return duplicate result. not sure if this should be 
considered as a indexer bug.

Sort and remove duplication from the result in VectorPostingIterator when 
requesting first result with next().


Diffs
-

  autotests/unit/engine/mtimedbtest.cpp e38022d 
  src/engine/mtimedb.h 1dc1cb9 
  src/engine/mtimedb.cpp f7283b5 

Diff: https://git.reviewboard.kde.org/r/126227/diff/


Testing
---

No more duplicate result or missing result.


Thanks,

Xuetian Weng


>> Visit http://mail.kde.org/mailman/listinfo/kde-devel#unsub to unsubscribe <<